Created
September 16, 2019 02:22
-
-
Save duduribeiro/2f2515f47d13ca766f0fe213b2feedaa to your computer and use it in GitHub Desktop.
Dockerfile 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dump build stage | |
FROM postgres:11-alpine as dumper | |
COPY test_dump.sql /docker-entrypoint-initdb.d/ | |
RUN ["sed", "-i", "s/exec \"$@\"/echo \"skipping...\"/", "/usr/local/bin/docker-entrypoint.sh"] | |
ENV PG_USER=postgres | |
ENV PGDATA=/data | |
RUN ["/usr/local/bin/docker-entrypoint.sh", "postgres"] | |
# final build stage | |
FROM postgres:11-alpine | |
COPY --from=dumper /data $PGDATA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment