Skip to content

Commit ffacf79

Browse files
fix: move ARG TARGETPLATFORM after FROM in Dockerfile
ARG before FROM is a global arg but needs to be redeclared after FROM to be available in the build stage.
1 parent 3d83c00 commit ffacf79

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# Multi-stage build for minimal container image
22
# Uses pre-built binaries from CI artifacts
33

4-
# We use alpine as base for the final image (for shell access if needed)
5-
# ARG is used to select the correct binary based on target platform
6-
ARG TARGETPLATFORM
7-
84
FROM alpine:latest
95

6+
# TARGETPLATFORM is automatically set by Docker buildx for multi-platform builds
7+
# Must be declared after FROM to use in this stage
8+
ARG TARGETPLATFORM
9+
1010
# Install minimal runtime dependencies (if any needed in future)
1111
# Currently ansilust is statically linked, so none needed
1212

0 commit comments

Comments
 (0)