From 52eb22548886dee7df1c0145a743182dc0a4cfc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=B3=E3=83=9E=E3=83=AA=E3=83=B3=E8=A6=AA=E8=A1=9B?= =?UTF-8?q?=E9=9A=8A?= Date: Sun, 4 Feb 2024 03:58:40 +0900 Subject: [PATCH] Update Dockerfile --- Dockerfile | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index f0fa4ae..1bdf986 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,18 +18,9 @@ RUN if [ $TARGETARCH = "amd64" ]; then \ RUN rustup target add $(cat /tmp/arch)-unknown-linux-musl COPY . . -RUN --mount=type=cache,target=/src/builder/target/ echo "Compiling" \ - if [ $(cat /tmp/arch) = "aarch64" ]; then - export CC_aarch64_unknown_linux_musl=clang - export AR_aarch64_unknown_linux_musl=llvm-ar - export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-Clink-self-contained=yes -Clinker=rust-lld" - else - echo "amd64 mode" - fi \ - cargo build --target=$(cat /tmp/arch)-unknown-linux-musl --release - cp target/$(cat /tmp/arch)-unknown-linux-musl/release/expander /tmp/expander - -FROM scratch +RUN --mount=type=cache,target=/src/builder/target/ bash build.sh + +FROM alpine WORKDIR /src/app