From f2935f1b06fe86b37fc75c2ea21ab9b8d6e6dd5c Mon Sep 17 00:00:00 2001 From: Chris Banks Date: Tue, 14 May 2024 15:09:40 +0100 Subject: [PATCH] Avoid ambiguous `ARG x y` syntax in Dockerfile. At the very least, dockerls doesn't like that syntax. --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9ce14d68..13f85440 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,10 @@ ARG go_version=1.22 ARG go_tag_suffix=-alpine FROM --platform=$TARGETPLATFORM ${go_registry}golang:${go_version}${go_tag_suffix} AS builder -ARG TARGETARCH TARGETOS -ARG GOARCH=$TARGETARCH GOOS=$TARGETOS +ARG TARGETARCH +ARG TARGETOS +ARG GOARCH=$TARGETARCH +ARG GOOS=$TARGETOS ARG CGO_ENABLED=0 ARG GOFLAGS="-trimpath" ARG go_ldflags="-s -w"