Concepts:
- container: an instance of running image
View images
$ docker images
Delete an image
$ docker image rm IMAGE_ID
View running containers
$ docker container ls
View all containers
$ docker container ls --all
Delete a container
$ docker container rm CONTAINER_NAME [--force]
Delete all containers
$ docker container prune
To run a new ubuntu container and start terminal
$ docker run -it ubuntu
To run bash on running container
$ docker exec -it CONTAINER_NAME bash
No comments:
Post a Comment