Fedora 34
Sponsored Link

Podman : Add Container Images2021/05/14

 
Add new Container images you modified settings.
[1] For exmaple, update an official image with installing [httpd] and add it as a new Container image.
# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG     IMAGE ID      CREATED      SIZE
registry.fedoraproject.org/fedora  latest  5f05951e2065  2 weeks ago  187 MB

# run a container and install [httpd]

[root@dlp ~]#
podman run fedora /bin/bash -c "dnf -y upgrade; dnf -y install httpd"

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

811c2bda6e81  registry.fedoraproject.org/fedora:latest  /bin/bash -c dnf ...  About a minute ago  Exited (0) 19 seconds ago           vigilant_bell

# add the image that [httpd] was installed

[root@dlp ~]#
podman commit 811c2bda6e81 srv.world/fedora-httpd

Getting image source signatures
.....
.....
Writing manifest to image destination
Storing signatures
810bed9d1157e93082827275ab5264e8553be7e80faa6ce9fe95155df77c4c2f

# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG     IMAGE ID      CREATED         SIZE
srv.world/fedora-httpd             latest  810bed9d1157  30 seconds ago  529 MB
registry.fedoraproject.org/fedora  latest  5f05951e2065  2 weeks ago     187 MB

# confirm [httpd] to run a container

[root@dlp ~]#
podman run srv.world/fedora-httpd /usr/bin/whereis httpd

httpd: /usr/sbin/httpd /usr/lib64/httpd /etc/httpd /usr/share/httpd
Matched Content