Skip to content

Commit

Permalink
Fix ARG location in dockerfile (#1185)
Browse files Browse the repository at this point in the history
With the old solution, ARG ended up not being defined in the "run" stage.
  • Loading branch information
LMG authored Apr 17, 2023
1 parent a0a8dfa commit 0986160
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# syntax=docker/dockerfile:1.4-labs

ARG ALPINE_VERSION=3.17
ARG ARCH=x86_64

FROM alpine:${ALPINE_VERSION} as rust-base

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

ARG ARCH=x86_64
ARG ARCH
ARG RUSTUP_VERSION=1.25.1
ARG RUST_VERSION=1.66.0
ARG RUST_ARCH=${ARCH}-unknown-linux-musl
Expand Down Expand Up @@ -184,6 +185,7 @@ COPY --from=build --link=false /usr/src/josh/static/ /josh/static/
ARG S6_OVERLAY_VERSION=3.1.2.1
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz
ARG ARCH
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${ARCH}.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-${ARCH}.tar.xz

Expand Down

0 comments on commit 0986160

Please sign in to comment.