ASE Lab - 20240502 - 041500 - 0000

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

docker images ls

docker container run ubuntu

docker container ps

docker container run ubuntu sleep 2

docker container run -d ubuntu sleep 20

docker container start <Container_id>

docker container run nginx

docker container rm <id_of_container>

docker container rm <id_of_container_1> <id_of_container_2>

docker container run -it ubuntu /bin/

Now, with access to the container, various tasks can be performed, such as installing software. For
instance:

apt-get install nano

Exiting the container can be accomplished by either pressing Ctrl + D or typing exit. However, if you wish to
exit the container while keeping it running in the background, use Ctrl + P + Q.

docker container rm $(docker container ls -aq)


This command removes all containers, ensuring a clean slate for further containerization endeavors.

You might also like