Spotter-VM/postgres/lxcfile

25 lines
715 B
Plaintext
Raw Normal View History

2018-09-05 17:41:38 +02:00
IMAGE postgres
LAYER shared/alpine
LAYER postgres/postgres
2018-09-12 16:08:10 +02:00
RUN EOF
2018-09-05 17:41:38 +02:00
# 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
# Add edge/testing repository for postgis support
echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories
# Install PostgreSQL + PostGIS
apk --no-cache add postgresql postgresql-contrib postgis@edge
# Create socket directory
mkdir /run/postgresql
chown postgres:postgres /run/postgresql
2018-09-12 16:08:10 +02:00
EOF
2018-09-05 17:41:38 +02:00
MOUNT /srv/postgres/data var/lib/postgresql
2018-09-06 14:27:40 +02:00
USER 5432 5432
2018-09-07 15:47:44 +02:00
CMD /usr/bin/postgres -D /var/lib/postgresql