Skip to content

Instantly share code, notes, and snippets.

@treyhuffine
Created January 21, 2020 23:51
Show Gist options
  • Save treyhuffine/99f0d534adb2bad7833bd669c0695510 to your computer and use it in GitHub Desktop.
Save treyhuffine/99f0d534adb2bad7833bd669c0695510 to your computer and use it in GitHub Desktop.
FROM postgres:latest
ARG FILE
ARG DBNAME
ENV FILE ${FILE}
ENV DBNAME ${DBNAME}
VOLUME /tmp
COPY ${FILE} /tmp/${FILE}
COPY restore_database.sh /docker-entrypoint-initdb.d/restore_database.sh
RUN sed -i 's/\r$//g' /docker-entrypoint-initdb.d/restore_database.sh
RUN chmod 777 /docker-entrypoint-initdb.d/restore_database.sh
EXPOSE 5432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment