Skip to content

Instantly share code, notes, and snippets.

@elbouillon
Last active August 29, 2015 14:23
Show Gist options
  • Save elbouillon/304c0ede2cb26f6a5a3e to your computer and use it in GitHub Desktop.
Save elbouillon/304c0ede2cb26f6a5a3e to your computer and use it in GitHub Desktop.
Docker Configuration
# Docker Compose file
db:
image: postgres
ports:
- "5432"
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
volumes:
- .:/myapp
ports:
- "3000:3000"
links:
- db
# Command to restore my data
docker-compose run web pg_restore -U postgres -d ppl_management_development dump.sql
# Error I get
Cannot start container 0b1be98e2317748edf103f4306982a77bfa0b2341dbc5050edafec5a465a0913: [8] System error: exec: "pg_restore": executable file not found in $PATH
@elbouillon
Copy link
Author

Runnnig it from my db container works :

docker-compose run db pg_restore -U postgres -d ppl_management_development /my_app/dump.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment