aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMhd Sulhan <ms@kilabit.info>2015-09-04 21:50:21 +0700
committerMhd Sulhan <ms@kilabit.info>2015-09-04 21:50:21 +0700
commiteefa05950967fab6531af6dadc02ce6bd46c2106 (patch)
tree33d4574378ea12212ac25afbb2694304bcdab787
parentd3e79c17e1f8e8a0e5643dc8f3ade2af333f58f3 (diff)
downloadarch-docker-eefa05950967fab6531af6dadc02ce6bd46c2106.tar.xz
Reorder commands to minimize temporary images creation.
-rw-r--r--arch-postgresql/Dockerfile.local13
-rw-r--r--arch-postgresql/Dockerfile.online7
2 files changed, 11 insertions, 9 deletions
diff --git a/arch-postgresql/Dockerfile.local b/arch-postgresql/Dockerfile.local
index ffab430..efca012 100644
--- a/arch-postgresql/Dockerfile.local
+++ b/arch-postgresql/Dockerfile.local
@@ -1,16 +1,17 @@
FROM sulhan/arch-base:latest
MAINTAINER Sulhan <ms@kilabit.info>
-COPY *.db /var/lib/pacman/sync/
-COPY *.xz /var/cache/pacman/pkg/
-
ExPOSE 5432
+VOLUME ["/var/lib/postgres"]
-COPY bootstrap.sh /
COPY init.sh /
-COPY pg_hba.conf /
COPY postgresql.conf /
+COPY pg_hba.conf /
+COPY bootstrap.sh /
+
+COPY *.db /var/lib/pacman/sync/
+COPY *.xz /var/cache/pacman/pkg/
RUN exec /bootstrap.sh
-ENTRYPOINT ["/init.sh"]
+CMD ["/init.sh"]
diff --git a/arch-postgresql/Dockerfile.online b/arch-postgresql/Dockerfile.online
index f84298a..f7c6dd2 100644
--- a/arch-postgresql/Dockerfile.online
+++ b/arch-postgresql/Dockerfile.online
@@ -2,12 +2,13 @@ FROM sulhan/arch-base:latest
MAINTAINER Sulhan <ms@kilabit.info>
ExPOSE 5432
+VOLUME ["/var/lib/postgres"]
-COPY bootstrap.sh /
COPY init.sh /
-COPY pg_hba.conf /
COPY postgresql.conf /
+COPY pg_hba.conf /
+COPY bootstrap.sh /
RUN exec /bootstrap.sh
-ENTRYPOINT ["/init.sh"]
+CMD ["/init.sh"]