Skip to content

Commit b793b68

Browse files
author
Matthew Fisher
authored
Merge pull request #138 from bacongobbler/refactor-move-copy-after-install
ref(Dockerfile): COPY after installing postgres
2 parents f519269 + 5b2cd0b commit b793b68

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

rootfs/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ FROM quay.io/deis/base:0.2.0
33
ENV LANG=en_US.utf8 \
44
PG_MAJOR=9.4 \
55
PG_VERSION=9.4.9-1.pgdg80+1 \
6-
PGDATA=/var/lib/postgresql/data \
7-
WALE_ENVDIR=/etc/wal-e.d/env
6+
PGDATA=/var/lib/postgresql/data
87

98
# Set this separately from those above since it depends on one of them
109
ENV PATH=/usr/lib/postgresql/$PG_MAJOR/bin:$PATH
@@ -16,8 +15,6 @@ RUN adduser --system \
1615
--group \
1716
postgres
1817

19-
COPY . /
20-
2118
RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
2219
&& curl -L -o /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture)" \
2320
&& curl -L -o /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.2/gosu-$(dpkg --print-architecture).asc" \
@@ -46,7 +43,6 @@ RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364
4643
&& chown -R postgres /var/run/postgresql \
4744
&& curl -sSL https://raw.githubusercontent.com/pypa/pip/7.1.2/contrib/get-pip.py | python - \
4845
&& pip install --disable-pip-version-check --no-cache-dir git+https://github.com/deis/wal-e.git@380821a6c4ea4f98a244680d7c6c5b04b8c694b3 \
49-
&& mkdir -p $WALE_ENVDIR \
5046
&& pip install --disable-pip-version-check --no-cache-dir envdir \
5147
&& apt-get remove -y --auto-remove --purge \
5248
gcc \
@@ -57,5 +53,9 @@ RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364
5753
&& apt-get clean \
5854
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/man /usr/share/doc
5955

56+
COPY . /
57+
ENV WALE_ENVDIR=/etc/wal-e.d/env
58+
RUN mkdir -p $WALE_ENVDIR
59+
6060
CMD ["/docker-entrypoint.sh", "postgres"]
6161
EXPOSE 5432

0 commit comments

Comments
 (0)