FROM alpine:latest
ENV TZ Asia/Shanghai ENV PG_USER postgres ENV PG_DATA /var/lib/postgresql/data ENV PG_SOCKET /run/postgresql
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
&& apk add --update --no-cache
tzdata
postgresql
postgresql-contrib
&& mkdir -p $PG_SOCKET && chown -R $PG_USER:$PG_USER $PG_SOCKET
&& rm /var/cache/apk/*
EXPOSE 5432
CMD [ "postgres", "-D", "$PG_DATA"]
Content type
Image
Digest
Size
10.6 MB
Last updated
over 8 years ago
docker pull bokee/postgresql