* Add requests as a dependency on all OSs * Split the install target into a common target and separate install-systemd and install-openrc targets to support installing on Alpine
24 lines
424 B
Docker
24 lines
424 B
Docker
FROM alpine:3.21
|
|
|
|
RUN apk update && \
|
|
apk add py3-psycopg2 \
|
|
py3-requests \
|
|
py3-yaml \
|
|
tini
|
|
|
|
WORKDIR /app
|
|
|
|
COPY src/pgmon.py /app/
|
|
|
|
COPY sample-config/pgmon-metrics.yml /app/
|
|
|
|
COPY tests/test-config.yml /app/
|
|
|
|
COPY --chmod=0600 --chown=postgres:postgres tests/pgpass /root/.pgpass
|
|
|
|
ENTRYPOINT ["tini", "--"]
|
|
|
|
EXPOSE 5400
|
|
|
|
CMD ["/app/pgmon.py", "-c", "/app/test-config.yml", "--test"]
|