Skip to content

Commit

Permalink
fix: add workaround to Makefile to fix build on Docker 26
Browse files Browse the repository at this point in the history
  • Loading branch information
remcoros committed May 14, 2024
1 parent 5c6893b commit f47810f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,27 @@ docker-images/aarch64.tar: Dockerfile docker_entrypoint.sh configurator/target/a
configurator/target/aarch64-unknown-linux-musl/release/configurator: $(CONFIGURATOR_SRC)
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:aarch64-musl cargo build --release
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:aarch64-musl musl-strip target/aarch64-unknown-linux-musl/release/configurator
# Docker 26 + buildkit 0.13.2 seem to have issues with building a context that contains multiple hardlinked files, work-around that by breaking the hardlink
cp --remove-destination configurator/target/aarch64-unknown-linux-musl/release/configurator configurator/target/aarch64-unknown-linux-musl/release/configurator.tmp
mv --force configurator/target/aarch64-unknown-linux-musl/release/configurator.tmp configurator/target/aarch64-unknown-linux-musl/release/configurator

health-check/target/aarch64-unknown-linux-musl/release/health-check: $(HEALTH_CHECK_SRC)
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:aarch64-musl cargo build --release
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:aarch64-musl musl-strip target/aarch64-unknown-linux-musl/release/health-check
cp --remove-destination health-check/target/aarch64-unknown-linux-musl/release/health-check health-check/target/aarch64-unknown-linux-musl/release/health-check.tmp
mv --force health-check/target/aarch64-unknown-linux-musl/release/health-check.tmp health-check/target/aarch64-unknown-linux-musl/release/health-check

configurator/target/x86_64-unknown-linux-musl/release/configurator: $(CONFIGURATOR_SRC)
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:x86_64-musl cargo build --release
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/configurator:/home/rust/src messense/rust-musl-cross:x86_64-musl musl-strip target/x86_64-unknown-linux-musl/release/configurator
cp --remove-destination configurator/target/x86_64-unknown-linux-musl/release/configurator configurator/target/x86_64-unknown-linux-musl/release/configurator.tmp
mv --force configurator/target/x86_64-unknown-linux-musl/release/configurator.tmp configurator/target/x86_64-unknown-linux-musl/release/configurator

health-check/target/x86_64-unknown-linux-musl/release/health-check: $(HEALTH_CHECK_SRC)
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:x86_64-musl cargo build --release
docker run --rm -v ~/.cargo/registry:/root/.cargo/registry -v "$(shell pwd)"/health-check:/home/rust/src messense/rust-musl-cross:x86_64-musl musl-strip target/x86_64-unknown-linux-musl/release/health-check
cp --remove-destination health-check/target/x86_64-unknown-linux-musl/release/health-check health-check/target/x86_64-unknown-linux-musl/release/health-check.tmp
mv --force health-check/target/x86_64-unknown-linux-musl/release/health-check.tmp health-check/target/x86_64-unknown-linux-musl/release/health-check

scripts/embassy.js: scripts/**/*.ts
deno bundle scripts/embassy.ts scripts/embassy.js

0 comments on commit f47810f

Please sign in to comment.