Closed kunjee17 closed 2 years ago
Until the docker image is updated in the registry, I use the following workaround that works for me:
# Clone the repo
git clone https://github.com/emk/rust-musl-builder.git /tmp/rust-musl-builder
# build your own image
cd /tmp/rust-musl-builder
docker build . -t rust-musl-2021
# cd to you project
# and build it within rust-musl-2021 container
docker run --rm -it -v "$(pwd)":/home/rust/src rust-musl-2021 cargo build --release
@emk Is there anything preventing you from pushing a new tag of this image for the new rust version? It's a shame I have to pull and build on CI when this could be done in one go.
Thanks
@evanxg852000 you can alternatively switch to https://github.com/clux/muslrust, which is what I have done.
I have moved to little bit bigger docker file based on Debian bullseye-slim . It solve other file serving issues from me as well. Yes, size got bigger but it is less headache.
Thanks, @martinjaeger but that image is not working on my embedded:cross
setup.
could not create home directory: '/.rustup': Permission denied (os error 13)
@kunjee17 I don't think it should be closed, though there is a workaround, the issue still stands to update the image with a rebuild.
See the discussion here: https://github.com/emk/rust-musl-builder/pull/126. This is the best tracking issue for this problem.
Docker Hub CI builds are no longer free, and this project has no sponsorships. The solution is to migrate our builds to GitHub CI.
We now have up-to-date builds using GitHub CI! Thank you to everyone for the encouragement.
What did you try to do? I have updated edition to 2021 and rust to latest version. Part of monthly update.
I have followed the steps provided in migration guild
edition = "2018" to edition = "2021"
What happened? Project compiles in local machine. But docker build is breaking with following message
error: edition 2021 is unstable and only available with -Z unstable-options.
What did you hope to happen? It should build without any issue.
Does
./test-image
work?If you check out the repository on a Mac or Linux system and run
./build-image
, does it succeed or fail? This will build several known-good examples from therust-musl-builder/examples
directory.Additional information
Is there anything else that we should know? It was working before edition migrated to 2021.