Ubuntu 24.04
Sponsored Link

Podman : Add Container Images2024/05/05

 
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      bf3dc08bfed0  5 days ago  78.7 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

8ba738311a1b  docker.io/library/ubuntu:latest  /bin/bash -c apt-...  26 seconds ago  Exited (0) 8 seconds ago              intelligent_haibt

# add the image that [apache2] was installed

root@dlp:~#
podman commit 8ba738311a1b srv.world/ubuntu-apache2

Getting image source signatures
Copying blob 80098e3d304c skipped: already exists
Copying blob 8b942a48c2d6 done   |
Copying config 38d5083368 done   |
Writing manifest to image destination
38d5083368637cec96e051ebe22f2b5776538eb9ad7dc2143f4d617896ec05f4

# show container images

root@dlp:~#
podman images

REPOSITORY                TAG         IMAGE ID      CREATED         SIZE
srv.world/ubuntu-apache2  latest      38d508336863  26 seconds ago  226 MB
docker.io/library/ubuntu  latest      bf3dc08bfed0  5 days ago      78.7 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