Skip to content

Instantly share code, notes, and snippets.

@vicneanschi
Last active August 29, 2015 14:26
Show Gist options
  • Save vicneanschi/96e4531be4433a9fead1 to your computer and use it in GitHub Desktop.
Save vicneanschi/96e4531be4433a9fead1 to your computer and use it in GitHub Desktop.
$ docker --help
# list of running containers
$ docker ps
$ docker images
$ docker pull <image>
# Expose container port 8080 as external port 8088
# After this command you should be able to access the container from the windows by http://192.168.59.103:8088/
$ docker run -d -p 8088:8080 rethinkdb
# Run a named container
$ docker run -d -P --name rethink5 rethinkdb
# Execute command in the container
$ docker exec rethink5 rethinkdb --help
# Get port mappings for the CONTAINER
$ docker port CONTAINER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment