2020-04-04 00:17:24 +02:00
|
|
|
IMAGE postgres_12.2.0-200403
|
2020-06-21 08:26:58 +02:00
|
|
|
FROM alpine3.11_3.11.6-200621
|
2020-02-07 18:28:24 +01:00
|
|
|
|
|
|
|
RUN EOF
|
2020-03-13 17:03:03 +01:00
|
|
|
# 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
|
|
|
|
|
2020-02-07 18:28:24 +01:00
|
|
|
# Install PostgreSQL
|
|
|
|
apk --no-cache add postgresql postgresql-contrib
|
|
|
|
|
|
|
|
# Create socket directory
|
|
|
|
mkdir /run/postgresql
|
|
|
|
chown postgres:postgres /run/postgresql
|
|
|
|
EOF
|
|
|
|
|
|
|
|
USER postgres
|
2020-03-13 17:03:03 +01:00
|
|
|
CMD /usr/bin/postgres -D /var/lib/postgresql
|
|
|
|
READY /usr/bin/pg_isready
|