Docker Cheat Sheet
This Docker cheat sheet contains all the basic commands, you use frequently while you are working with Docker. But, it is difficult to keep remember all these commands and you prepare stickies. But now, no more stickies. You can use this cheat sheet as your sticky notes. | |
Build, Remove, List and tag an Image |
---|
Build an image from the Dockerfile in the current directory and tag the image
- Don't miss dot (.). This used to save image in current directory. - tag can be a version for image. - Tag is optional but image-name is Required. |
List of Images
|
Tag Images
|
Delete the Image
|
Remove, List, Start, Stop one or more containers |
---|
Start Container
|
Stop Running Container
- Difference between docker stop and docker kill is docker stop gives the container to shutdown gracefully. But docker kill stop immediately. |
List of running container/services
|
Remove Container
- Container/Image name and Container id you can get using docker ps command |
Access running container
|
Show logs | Login, Pull and Push image in docker hub registry |
---|
- 5m for 5 minutes - 5s for 5 seconds - 5h for 5 hours - will show last 200 lines |
|
Run service |
---|
|
Comments
Post a Comment