Skip to content
This repository was archived by the owner on Sep 10, 2024. It is now read-only.

Commit 2761ac0

Browse files
committed
docker: Switch a glibc-based build
Similar to what was done for the pre-built binaries
1 parent 1f3c1ef commit 2761ac0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ RUN --network=default \
9393
RUN --network=default \
9494
rustup target add \
9595
--toolchain "${RUSTC_VERSION}" \
96-
x86_64-unknown-linux-musl \
97-
aarch64-unknown-linux-musl
96+
x86_64-unknown-linux-gnu \
97+
aarch64-unknown-linux-gnu
9898

9999
# Set the working directory
100100
WORKDIR /app
@@ -124,8 +124,8 @@ RUN --network=default \
124124
--recipe-path recipe.json \
125125
--no-default-features \
126126
--features docker \
127-
--target x86_64-unknown-linux-musl \
128-
--target aarch64-unknown-linux-musl \
127+
--target x86_64-unknown-linux-gnu \
128+
--target aarch64-unknown-linux-gnu \
129129
--package mas-cli
130130

131131
# Build the rest
@@ -140,14 +140,14 @@ RUN --network=default \
140140
--bin mas-cli \
141141
--no-default-features \
142142
--features docker \
143-
--target x86_64-unknown-linux-musl \
144-
--target aarch64-unknown-linux-musl
143+
--target x86_64-unknown-linux-gnu \
144+
--target aarch64-unknown-linux-gnu
145145

146146
# Move the binary to avoid having to guess its name in the next stage
147147
RUN --network=none \
148-
mv "target/x86_64-unknown-linux-musl/release/mas-cli" /usr/local/bin/mas-cli-amd64
148+
mv "target/x86_64-unknown-linux-gnu/release/mas-cli" /usr/local/bin/mas-cli-amd64
149149
RUN --network=none \
150-
mv "target/aarch64-unknown-linux-musl/release/mas-cli" /usr/local/bin/mas-cli-arm64
150+
mv "target/aarch64-unknown-linux-gnu/release/mas-cli" /usr/local/bin/mas-cli-arm64
151151

152152
#######################################
153153
## Prepare /usr/local/share/mas-cli/ ##
@@ -162,7 +162,7 @@ COPY ./translations/ /share/translations
162162
##################################
163163
## Runtime stage, debug variant ##
164164
##################################
165-
FROM --platform=${TARGETPLATFORM} gcr.io/distroless/static-debian${DEBIAN_VERSION}:debug-nonroot AS debug
165+
FROM --platform=${TARGETPLATFORM} gcr.io/distroless/base-nossl-debian${DEBIAN_VERSION}:debug-nonroot AS debug
166166

167167
ARG TARGETARCH
168168
COPY --from=builder /usr/local/bin/mas-cli-${TARGETARCH} /usr/local/bin/mas-cli
@@ -174,7 +174,7 @@ ENTRYPOINT ["/usr/local/bin/mas-cli"]
174174
###################
175175
## Runtime stage ##
176176
###################
177-
FROM --platform=${TARGETPLATFORM} gcr.io/distroless/static-debian${DEBIAN_VERSION}:nonroot
177+
FROM --platform=${TARGETPLATFORM} gcr.io/distroless/base-nossl-debian${DEBIAN_VERSION}:nonroot
178178

179179
ARG TARGETARCH
180180
COPY --from=builder /usr/local/bin/mas-cli-${TARGETARCH} /usr/local/bin/mas-cli

0 commit comments

Comments
 (0)