Show all docker images:
$docker images
Show all running docker containers:
$docker ps
Show all stopped and running docker containers:
$docker ps -a
Delete a stopped docker container:
$docker rm _container_id_
Delete a all docker containers:
$ docker rm `docker ps -aq`
Useful link: https://docs.docker.com/engine/userguide/basics/
SSH / BASH into a running container:
1. If the container was started into /bin/bash mode:
$docker images
Show all running docker containers:
$docker ps
Show all stopped and running docker containers:
$docker ps -a
Delete a stopped docker container:
$docker rm _container_id_
Delete a all docker containers:
$ docker rm `docker ps -aq`
Useful link: https://docs.docker.com/engine/userguide/basics/
SSH / BASH into a running container:
1. If the container was started into /bin/bash mode:
$ sudo docker attach 665b4a1e17b6 #by ID and then press enter
or
$ sudo docker attach loving_heisenberg #by Name and the press enter
2. If the container was not started in bash mode$ sudo docker exec -i -t 665b4a1e17b6 bash #by ID
or
$ sudo docker exec -i -t loving_heisenberg bash #by Name
No comments:
Post a Comment