From be4e0a179af8381e7dd3343a413dbbc02d827ded Mon Sep 17 00:00:00 2001 From: Ian Fijolek Date: Thu, 4 Jan 2024 09:15:20 -0800 Subject: [PATCH] Fix args in dockerfiles --- Dockerfile | 2 +- Dockerfile.multi-stage | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c250162..6580fdc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ WORKDIR /app/ RUN addgroup -S nomad-var-dirsync && adduser -S nomad-var-dirsync -G nomad-var-dirsync # Copy binary in -COPY ./dist/nomad-var-dirsync-TARGETOS-TARGETARCH ./nomad-var-dirsync +COPY ./dist/nomad-var-dirsync-${TARGETOS}-${TARGETARCH} ./nomad-var-dirsync # Drop to non-root user USER nomad-var-dirsync diff --git a/Dockerfile.multi-stage b/Dockerfile.multi-stage index d101053..154d30d 100644 --- a/Dockerfile.multi-stage +++ b/Dockerfile.multi-stage @@ -12,7 +12,7 @@ RUN go mod download COPY ./*.go /app/ ARG VERSION=dev -ENV CGO_ENABLED=0 GOOS=TARGETOS GOARCH=TARGETARCH +ENV CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} RUN go build -ldflags "-X main.version=VERSION" -a -installsuffix nocgo -o nomad-var-dirsync . FROM REPO/alpine:3.19