M .gitignore => .gitignore +3 -0
@@ 1,1 1,4 @@
target/
+
+# cargo cache for docker builds
+.cargo-cache/
M client/build.sh => client/build.sh +4 -0
@@ 22,6 22,8 @@ function buildmusl() {
# create the target dir
mkdir ../target
+ mkdir ../.cargo-cache
+
# use the docker image to build an executable
docker run --rm --user "$(id -u)":"$(id -g)" \
-v "$PWD":/usr/src/client \
@@ 29,6 31,8 @@ function buildmusl() {
-v "$PWD/../Cargo.toml":/usr/src/Cargo.toml \
-v "$PWD/../Cargo.lock":/usr/src/Cargo.lock \
-v "$PWD/../.cargo":/usr/src/.cargo \
+ -v "$PWD/../.cargo-cache":/usr/src/.cargo-cache \
+ -e CARGO_HOME=/usr/src/.cargo-cache \
-w /usr/src/ \
laurelinclient-musl-builder \
cargo build --release