Closed sentient-abanchich closed 5 years ago
it doesn't save anything in target on my host after the first run. If I run rust-musl-builder without any command and ls ./target I can see the binary is created there.
This is actually deliberate. :-) But the reasons aren't obvious.
To cache builds, we need to keep the target
directory on your Docker host. If you want to extract the binaries, see examples/build-release for example docker cp
shell commands showing how to extract the binaries.
It would be good to explain this in the README.
Awesome, thank you so much!
I am guessing I'm just doing something wrong, but I found if I cache builds using this command (I'm using
fish
but I've also tried inbash
andzsh
:it doesn't save anything in
target
on my host after the first run. If I runrust-musl-builder
without any command andls ./target
I can see the binary is created there.Even when I
rm
the binary inside the container and rebuild usingrust-musl-builder cargo build --release
, it only appears in the container but not on my host computer (macOS).If I set the alias to remove the caching volumes:
it always works correctly and the binary does appear on my host.
One thing I've noticed is that the
target
directory WILL appear in my host's project directory after I try to build, but it will be empty; it's only the content oftarget
which are not showing up.Any thoughts on what the issue could be?
Thank you