0

I have a data dump file (without .sql extension) of an entire database created from an existing PostgreSQL database using pg_dump command. I want to populate a new PostgreSQL database - to run inside a Docker container - with that dump file while creating and running a Docker container for the first time. The docker container is created from this Docker image and docker compose will be used to run this new PostgreSQL database as service.

2
  • 1
    did you try the docker-entrypoint-initdb.d (hub.docker.com/_/postgres)? Commented Jul 30, 2021 at 7:15
  • @LucasBazetto, Thanks it worked for me, but I had to change the pg_dump file (compressed/binary) to .sql format. That is, it did not work with pg_dump compressed / binary file. Commented Jul 30, 2021 at 18:50

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.