Spotter-VM/lxc-services/postgres/lxcfile

20 lines
507 B
Plaintext

IMAGE postgres_11.3.0-190620
FROM alpine3.9_3.9.4-190620
RUN EOF
# Modify OS user (which will be picked up later by apk add)
sed -i 's/postgres:x:70:70/postgres:x:5432:5432/' /etc/passwd
sed -i 's/postgres:x:70/postgres:x:5432/' /etc/group
# Install PostgreSQL
apk --no-cache add postgresql postgresql-contrib
# Create socket directory
mkdir /run/postgresql
chown postgres:postgres /run/postgresql
EOF
USER 5432 5432
CMD postgres -D /var/lib/postgresql
READY pg_isready