Skip to content

Instantly share code, notes, and snippets.

@hunt3ri
Last active May 23, 2017 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hunt3ri/f86c2d41b2dbc87af7b6e2dbd05682c3 to your computer and use it in GitHub Desktop.
Save hunt3ri/f86c2d41b2dbc87af7b6e2dbd05682c3 to your computer and use it in GitHub Desktop.
Build, run and connect postgres docker file
mkdir data-load
vi Dockerfile # Copy Docker commands listed above into your local Dockerfile
docker build -t postgres-db .
docker run -d -v /Users/iainhunter/dev/docker/postgres/data-load:/data-loader -p 5432:5432 postgres-db
docker ps
docker exec -it <imageId> bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment