Skip to content

Instantly share code, notes, and snippets.

@garystafford
Last active March 23, 2018 20:07
Show Gist options
  • Save garystafford/659cd5e64a19ee5e6c2b096e7175d4fd to your computer and use it in GitHub Desktop.
Save garystafford/659cd5e64a19ee5e6c2b096e7175d4fd to your computer and use it in GitHub Desktop.
# create container
docker run --name postgres \
-e POSTGRES_USERNAME=postgres \
-e POSTGRES_PASSWORD=postgres1234 \
-e POSTGRES_DB=elections \
-p 5432:5432 \
-d postgres
# view container
docker container ls
# trail container logs
docker logs postgres --follow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment