Skip to content

Check and edit containers

Mahdieh-dst edited this page Jul 5, 2022 · 2 revisions

To see the running containers and their associated id and name, type this in the terminal:

docker ps

Then, you can do docker exec to to run commands on the already running container (Docker Run vs Docker Exec: docker run is the command you use to create a new container from an image, whilst docker exec lets you run commands on an already running container!)

docker exec -it container-id /bin/bash

To update the apps inside the container:

apt update

To install i.e tree in the container:

apt install tree