[Kotlin/Native] Linking stage fails
37 Replies
windows build succeeds. minimal repro: https://github.com/vyfor/kord-test
i think I need to build
curl
from source with websockets support. i copied a script that does just that, but now the linker is unable to find curl
at allThis is what we do https://github.com/kordlib/setup-curl/blob/v1/action.yml#L25-L38
GitHub
setup-curl/action.yml at v1 · kordlib/setup-curl
Contribute to kordlib/setup-curl development by creating an account on GitHub.
you can also find an example here
GitHub
GitHub - DRSchlaubi/alphabet: Test bot for Kord on Kotlin/JS and Ko...
Test bot for Kord on Kotlin/JS and Kotlin/Native. Contribute to DRSchlaubi/alphabet development by creating an account on GitHub.
works like a charm, thank you !
hey, i'm new to Docker, and i tried using that Docker template, but i'm not sure how the application is built. i added my build command to the Dockerfile, but it's just skipping it, and in the end, it can't find the compiled application:
Run the build outside of the container
the copy command is for copying files from outside the container into it
but you shouldn't build in the container b/c you'll be leaving all the development stuff in the layers
alternatively, you can use docker to build, but don't use a dockerfile for that, use the docker command directly and map a volume between a local build directory and the target directory in the container
but yeah really the canonical way to do this is to build outside of the container and then copy the result into it
ohh right, that's how it works
i'll give it a go
there isn't really any good reason to build inside the container
you can't run eg an ARM container on x64 anyway so
do you want a bit more in-depth info?
that'd be awesome
so, containers are structured in a more complex way than you'd expect
when you write a dockerfile, you're instructing the docker daemon on how to build the final container image
but it actually creates a separate layer for each actionable command
what that means is if, for example, you have a step running git, then a step downloading a toolchain, then a step building the project, then a step deleting the git files...
each one of those is a layer docker has to download and deploy whenever you use the container, and those layers also have to be uploaded to your docker registry
you really want to avoid doing that if you can
the containers themselves run in a very light virtualisation layer that shares the kernel with the host OS
which means you can't really cross-compile easily and the containers you're building and running will be specific to your machine's architecture
tho these days that's really just ARM and x64
(there are others, but commonly)
oh hmm i never realized that
docker is a lot simpler in concept than most people expect
then you have volumes, which allow you to map a path in a container to a mount of some sort
often that'll be a bind mount to a path on the host, but not always
the dockerfile won't contain a mapping, but you can still define the volumes you expect to exist
but you probably don't need to worry about that right now
this reference is pretty handy https://docs.docker.com/reference/dockerfile/
Docker Documentation
Dockerfile reference
Find all the available commands you can use in a Dockerfile and learn how to use them, including COPY, ARG, ENTRYPOINT, and more.
and if you need to generate a dockerfile based on your project's data, I released this today https://docs.kordex.dev/docker-plugin
Kord Extensions Help
Docker Plugin | Kord Extensions
gotcha! i've never had to deal with Docker before, i went for it as the hosting wouldn't allow me to do authorized stuff unless i used a container, though i found a workaround just now
docker is very useful