Add netcat install in dockerfile to provide a way to healthcheck in docker compose (#572)

This commit is contained in:
Joubert RedRat 2022-08-19 11:22:16 -03:00 committed by GitHub
parent 9a75243732
commit 1f65fec9ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -16,7 +16,7 @@ FROM debian:buster-slim
RUN \
apt-get update && \
apt-get install -y ca-certificates openssl postgresql && \
apt-get install -y ca-certificates openssl postgresql netcat && \
update-ca-certificates && \
apt-get clean autoclean && \
apt-get autoremove --yes && \

View File

@ -31,6 +31,9 @@ services:
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "nc", "-vz", "127.0.0.1", "8081"]
interval: 5s
volumes:
data: