This commit is contained in:
parent
c22eea76a1
commit
be4e0a179a
@ -10,7 +10,7 @@ WORKDIR /app/
|
|||||||
RUN addgroup -S nomad-var-dirsync && adduser -S nomad-var-dirsync -G nomad-var-dirsync
|
RUN addgroup -S nomad-var-dirsync && adduser -S nomad-var-dirsync -G nomad-var-dirsync
|
||||||
|
|
||||||
# Copy binary in
|
# 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
|
# Drop to non-root user
|
||||||
USER nomad-var-dirsync
|
USER nomad-var-dirsync
|
||||||
|
@ -12,7 +12,7 @@ RUN go mod download
|
|||||||
COPY ./*.go /app/
|
COPY ./*.go /app/
|
||||||
|
|
||||||
ARG VERSION=dev
|
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 .
|
RUN go build -ldflags "-X main.version=VERSION" -a -installsuffix nocgo -o nomad-var-dirsync .
|
||||||
|
|
||||||
FROM REPO/alpine:3.19
|
FROM REPO/alpine:3.19
|
||||||
|
Loading…
Reference in New Issue
Block a user