Ubuntu 25.04
Sponsored Link

Podman : Add Container Images2025/04/22

 

Add new Container images you modified settings.

[1] For example, update an official image with installing [apache2] and add it as a new Container image.
# show container images

root@dlp:~#
podman images

REPOSITORY                TAG         IMAGE ID      CREATED      SIZE
docker.io/library/ubuntu  latest      602eb6fb314b  13 days ago  80.6 MB

# run a container and install [apache2]

root@dlp:~#
podman run ubuntu /bin/bash -c "apt-get update; apt-get -y install apache2"

root@dlp:~#
podman ps -a | tail -1

883b931a0daf  docker.io/library/ubuntu:latest  /bin/bash -c apt-...  20 seconds ago  Exited (0) 2 seconds ago                tender_black

# add the image that [apache2] was installed

root@dlp:~#
podman commit 883b931a0daf srv.world/ubuntu-apache2

Getting image source signatures
Copying blob 3abdd8a5e7a8 skipped: already exists
Copying blob f79d3ba251f4 done   |
Copying config b7f1351d1b done   |
Writing manifest to image destination
b7f1351d1b3c977bf1afc7932e75b570c858fd4f655bc23cf44695d90ce822fe

# show container images

root@dlp:~#
podman images

REPOSITORY                TAG         IMAGE ID      CREATED         SIZE
srv.world/ubuntu-apache2  latest      b7f1351d1b3c  15 seconds ago  246 MB
docker.io/library/ubuntu  latest      602eb6fb314b  13 days ago     80.6 MB

# confirm [apache2] to run a container

root@dlp:~#
podman run srv.world/ubuntu-apache2 /usr/bin/whereis apache2

apache2: /usr/sbin/apache2 /usr/lib/apache2 /etc/apache2 /usr/share/apache2
Matched Content