Working with Images
Objective
Learn how to work with containers images
Requirements
Make sure Podman or Docker (or any other containers engine) is installed on your system
Instructions
- List the containers images in your environment
- Pull the latest ubuntu image
- Run a container with the image you just pulled
- Remove the image. Did it work?
- Do whatever is needed in order to remove the image
Answer
Objective
Learn how to work with containers images
Requirements
Make sure Podman, Docker (or any other containers engine) is installed on your system
Instructions
- List the containers images in your environment -
podman image ls - Pull the latest ubuntu image -
podman image pull ubuntu:latest - Run a container with the image you just pulled -
podman container run -it ubuntu:latest /bin/bash - Remove the image. Did it work? - No. There is a running container which is using the image we try to remove
- Do whatever is needed in order to remove the image -
podman rm <container_id>; podman image rm ubuntu