2024-01-04 04:39:47 +00:00
|
|
|
ARG TARGETOS
|
|
|
|
ARG TARGETARCH
|
|
|
|
|
|
|
|
FROM alpine:3.19
|
|
|
|
|
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app/
|
|
|
|
|
|
|
|
# Add user for running as non-root
|
|
|
|
RUN addgroup -S nomad-var-dirsync && adduser -S nomad-var-dirsync -G nomad-var-dirsync
|
|
|
|
|
|
|
|
# Copy binary in
|
2024-01-04 17:15:20 +00:00
|
|
|
COPY ./dist/nomad-var-dirsync-${TARGETOS}-${TARGETARCH} ./nomad-var-dirsync
|
2024-01-04 04:39:47 +00:00
|
|
|
|
|
|
|
# Drop to non-root user
|
|
|
|
USER nomad-var-dirsync
|
|
|
|
|
|
|
|
ENTRYPOINT [ "./nomad-var-dirsync" ]
|