Skip to content

Instantly share code, notes, and snippets.

@lorenadl
Last active June 13, 2018 07:36
Show Gist options
  • Save lorenadl/a296f0404708e7c258030b2f95cb97b4 to your computer and use it in GitHub Desktop.
Save lorenadl/a296f0404708e7c258030b2f95cb97b4 to your computer and use it in GitHub Desktop.
Docker commands

Docker commands

Docker images repository:

https://hub.docker.com/explore/

Search an image

docker search <name>

Example:

docker search redi

Run an image

docker run <options> <image-name>

Example: to run 'redis' image in background:

docker run -d redis

Finding running containers

docker ps

More information on a running container (e.g. IP address)

docker inspect <friendly-name | container-id>

Display messages the container has written displayed on standard error or standard out

docker logs <friendly-name | container-id>

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