Skip to content

Commit 0986160

Browse files
authored
Fix ARG location in dockerfile (#1185)
With the old solution, ARG ended up not being defined in the "run" stage.
1 parent a0a8dfa commit 0986160

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# syntax=docker/dockerfile:1.4-labs
22

33
ARG ALPINE_VERSION=3.17
4+
ARG ARCH=x86_64
45

56
FROM alpine:${ALPINE_VERSION} as rust-base
67

@@ -10,7 +11,7 @@ ENV RUSTUP_HOME=/usr/local/rustup
1011
ENV CARGO_HOME=/usr/local/cargo
1112
ENV PATH=/usr/local/cargo/bin:${PATH}
1213

13-
ARG ARCH=x86_64
14+
ARG ARCH
1415
ARG RUSTUP_VERSION=1.25.1
1516
ARG RUST_VERSION=1.66.0
1617
ARG RUST_ARCH=${ARCH}-unknown-linux-musl
@@ -184,6 +185,7 @@ COPY --from=build --link=false /usr/src/josh/static/ /josh/static/
184185
ARG S6_OVERLAY_VERSION=3.1.2.1
185186
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
186187
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
188+
ARG ARCH
187189
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${ARCH}.tar.xz /tmp
188190
RUN tar -C / -Jxpf /tmp/s6-overlay-${ARCH}.tar.xz
189191

0 commit comments

Comments
 (0)