mirror of
https://github.com/wassname/docker-postgresql.git
synced 2026-07-06 05:15:13 +08:00
dockerfile: use the PG_HOME macro where ever possible
This commit is contained in:
+2
-2
@@ -13,12 +13,12 @@ RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-k
|
||||
&& echo 'deb http://apt.postgresql.org/pub/repos/apt/ trusty-pgdg main' > /etc/apt/sources.list.d/pgdg.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y postgresql-${PG_VERSION} postgresql-client-${PG_VERSION} postgresql-contrib-${PG_VERSION} \
|
||||
&& rm -rf /var/lib/postgresql \
|
||||
&& rm -rf ${PG_HOME} \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY start /start
|
||||
RUN chmod 755 /start
|
||||
|
||||
EXPOSE 5432/tcp
|
||||
VOLUME ["/var/lib/postgresql", "/run/postgresql"]
|
||||
VOLUME ["${PG_HOME}", "/run/postgresql"]
|
||||
CMD ["/start"]
|
||||
|
||||
Reference in New Issue
Block a user