2019-11-22 22:44:21 +00:00
|
|
|
ARG REPO=library
|
2021-05-12 23:22:24 +00:00
|
|
|
FROM ${REPO}/alpine:3.13
|
2020-01-10 22:21:48 +00:00
|
|
|
|
2019-11-22 20:58:26 +00:00
|
|
|
RUN mkdir /app
|
|
|
|
WORKDIR /app/
|
2019-10-11 00:20:42 +00:00
|
|
|
|
2019-11-22 20:58:26 +00:00
|
|
|
# Add common checking tools
|
2021-05-12 23:22:24 +00:00
|
|
|
RUN apk --no-cache add bash=~5.1.0 curl=~7.76.1 jq=~1.6
|
2019-11-22 20:58:26 +00:00
|
|
|
|
|
|
|
# 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
|
|
|
|
ARG ARCH=amd64
|
2020-07-07 03:05:12 +00:00
|
|
|
COPY ./dist/minitor-linux-${ARCH} ./minitor
|
2020-01-10 21:58:17 +00:00
|
|
|
|
2019-11-22 20:58:26 +00:00
|
|
|
# Drop to non-root user
|
|
|
|
USER minitor
|
|
|
|
|
2019-10-11 00:20:42 +00:00
|
|
|
ENTRYPOINT [ "./minitor" ]
|