Spotter-VM/lxc-services/postgres/image

20 lines
529 B
Plaintext

IMAGE postgres_12.2.0-200403
FROM alpine3.11_3.11.6-200621
RUN EOF
# Create OS user (which will be picked up later by apk add)
addgroup -S -g 5432 postgres
adduser -S -u 5432 -h /var/lib/postgresql -s /bin/false -g postgres -G postgres postgres
# Install PostgreSQL
apk --no-cache add postgresql postgresql-contrib
# Create socket directory
mkdir /run/postgresql
chown postgres:postgres /run/postgresql
EOF
USER postgres
CMD /usr/bin/postgres -D /var/lib/postgresql
READY /usr/bin/pg_isready