Created
June 3, 2019 08:13
-
-
Save vemuruadi/24ae893726c4fbab0030b80b8c5ffd48 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Build image ## | |
docker build -t image_name . | |
### Build image with version tag ### | |
docker build -t image_name:version_tag . (To build particular version) | |
### Run image ### | |
docker run image_name -it bash | |
### Pull image from repository ### | |
docker pull image_name | |
### Pull Iimage with particular version ### | |
docker pull image_name:version_tag | |
### List all containers ### | |
docker ps | |
### Display logs of containers ### | |
docker logs --follw container_name | |
### Stop container ### | |
docker stop container_name | |
### Stop all running containers ### | |
docker stop $(docker ps -a -q) | |
### Remove container ### | |
docker rm container_name | |
### Remove all stopped containers ### | |
docker rm $(docker ps -a -q) | |
### Remove Image ### | |
docker rmi image_name | |
### Remove All images ### | |
docker rmi $(docker images -q) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment