Ubuntu 22.04
Sponsored Link

Podman : Add Container Images2022/04/28

 
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      3f4714ee068a  6 days ago  80.3 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

7c8185be6e41  docker.io/library/ubuntu:latest  /bin/bash -c apt-...  About a minute ago  Exited (0) 37 seconds ago               dreamy_wescoff

# add the image that [apache2] was installed

root@dlp:~#
podman commit 7c8185be6e41 srv.world/ubuntu-apache2

Getting image source signatures
Copying blob b401a928648a skipped: already exists
Copying blob 5c65e9917456 done
Copying config c5d3a78bc3 done
Writing manifest to image destination
Storing signatures
c5d3a78bc38f522f32a50c99d44c76ac3cb7bd24ca9ccc2555fd900543fdb0b7

# show container images

root@dlp:~#
podman images

REPOSITORY                TAG         IMAGE ID      CREATED         SIZE
srv.world/ubuntu-apache2  latest      c5d3a78bc38f  14 seconds ago  224 MB
docker.io/library/ubuntu  latest      3f4714ee068a  6 days ago      80.3 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