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