|
|
|
@ -7,12 +7,19 @@ LABEL maintainer="ian@iamthefij.com"
|
|
|
|
|
ARG ARCH=x86_64 |
|
|
|
|
COPY ./build/qemu-${ARCH}-static /usr/bin/ |
|
|
|
|
|
|
|
|
|
COPY ./sample-config.yml /app/config.yml |
|
|
|
|
# Add common checking tools |
|
|
|
|
RUN apk add bash curl jq |
|
|
|
|
WORKDIR /app |
|
|
|
|
|
|
|
|
|
# Add minitor user for running as non-root |
|
|
|
|
RUN addgroup -S minitor && adduser -S minitor -G minitor |
|
|
|
|
|
|
|
|
|
# Expose default metrics port |
|
|
|
|
EXPOSE 8080 |
|
|
|
|
|
|
|
|
|
# Copy default sample config |
|
|
|
|
COPY ./sample-config.yml /app/config.yml |
|
|
|
|
|
|
|
|
|
# Copy Python package to container |
|
|
|
|
COPY ./README.md /app/ |
|
|
|
|
COPY ./setup.py /app/ |
|
|
|
@ -25,4 +32,7 @@ COPY ./scripts /app/scripts
|
|
|
|
|
# Allow all users to execute minitor and scripts |
|
|
|
|
RUN chmod -R 755 /app |
|
|
|
|
|
|
|
|
|
# Drop to non-root user |
|
|
|
|
USER minitor |
|
|
|
|
|
|
|
|
|
ENTRYPOINT [ "python3", "-m", "minitor.main" ] |
|
|
|
|