Skip to content
The basic commands you need, to be productive with docker:
How do I get a list of all running docker containers ?
How do I just get all the containers ?
How do I remove a container ?
- docker rm <container id or name>
How do I see all my images ?
How do I remove an image ?
- docker rmi <name of image here>
How do I get an image on to my local machine ?
- docker pull <name of image here>
How do I make a container and run it ?
How do I run & start a interactive shell with my container ?
- docker run -it <image name>
How do I map a port from my container to the outside ?
- docker run -p <outside port>:<port inside docker container> <image name>
How do I get details about an image ?
- docker inspect <image name>
How do I look at the logs coming out of a container ?
- docker logs <container name>
How do I start up a container and leave it running, without it consuming a session ?
- docker run -d <image name>
How do I build my application, and tag it ?
- docker build -t <user-name>/<app-name> .
Like this:
Like Loading...