Fedora 33
Sponsored Link

Podman : Add Container Images
2020/11/06
 
Add new Container Images.
[1] For exmaple, update official image with installing [httpd] and add it as a new Container Images.
# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG     IMAGE ID      CREATED     SIZE
registry.fedoraproject.org/fedora  latest  79fd58dc7611  8 days ago  181 MB

# run container and install [httpd]

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

[root@dlp ~]#
podman ps -a | head -2

CONTAINER ID  IMAGE                                     COMMAND               CREATED             STATUS                     PORTS   NAMES
a93e615d6299  registry.fedoraproject.org/fedora:latest  /bin/bash -c dnf ...  About a minute ago  Exited (0) 16 seconds ago          funny_mahavira

# add the image that [httpd] was installed

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

Getting image source signatures
.....
.....
.....
Writing manifest to image destination
Storing signatures
56430ecb044dc66614be5355bf138fa23c596c8089bc9c6741f1db8ae01b98da

# show container images

[root@dlp ~]#
podman images

REPOSITORY                         TAG     IMAGE ID      CREATED         SIZE
srv.world/fedora-httpd             latest  56430ecb044d  32 seconds ago  439 MB
registry.fedoraproject.org/fedora  latest  79fd58dc7611  8 days ago      181 MB

# confirm [httpd] to run 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