minitor-go/Dockerfile

25 lines
493 B
Docker
Raw Permalink Normal View History

2024-04-03 19:15:11 +00:00
FROM alpine:3.18
2020-01-10 22:21:48 +00:00
RUN mkdir /app
WORKDIR /app/
2019-10-11 00:20:42 +00:00
# Add common checking tools
2024-04-03 19:15:11 +00:00
RUN apk --no-cache add bash=~5 curl=~8 jq=~1 bind-tools=~9 tzdata~=2024a
# Add minitor user for running as non-root
RUN addgroup -S minitor && adduser -S minitor -G minitor
# Copy scripts
COPY ./scripts /app/scripts
RUN chmod -R 755 /app/scripts
2020-01-10 21:58:17 +00:00
# Copy minitor in
2024-04-03 19:15:11 +00:00
ARG TARGETOS
ARG TARGETARCH
COPY ./dist/minitor-${TARGETOS}-${TARGETARCH} ./minitor
2020-01-10 21:58:17 +00:00
# Drop to non-root user
USER minitor
2019-10-11 00:20:42 +00:00
ENTRYPOINT [ "./minitor" ]