Docker
Create Image
$ docker build -t [IMAGE-NAME]:[TAGVERSION] . (1)
1 | Build a new image and gives it the name '[IMAGE-NAME]:[TAGVERSION]'. |
Run Image
$ docker run -d --name [CONTAINER-NAME] [IMAGE-NAME]:[TAGVERSION] (1)
1 | Creates a new container process. |
Run /bin/sh in Container
$ docker exec -it [CONTAINER-NAME] /bin/sh (1)
1 | This runs the /bin/sh shell in the container '[CONTAINER-NAME]'. |
Prune images
$ docker image prune --force
Sometimes we need to remove those images where the repository is marked as <none> and so the version. |
Remove local image
$ docker rmi [OPTIONS] IMAGE [IMAGE...] (1)
1 | Refer to Docker |