CentOS 8
Sponsored Link

Podman : Add Container Images
2019/10/11
 
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
docker.io/library/centos   latest   0f3e07c0138f   8 days ago   227 MB

# run container and install [httpd]

[root@dlp ~]#
podman run centos /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
bb3e0b35d441  docker.io/library/centos:latest  /bin/bash -c dnf ...  50 seconds ago  Exited (0) 13 seconds ago           vigorous_shockley

# add the image that [httpd] was installed

[root@dlp ~]#
podman commit bb3e0b35d441 srv.world/centos_httpd

Getting image source signatures
Skipping blob 9e607bb861a7 (already present): 216.91 MiB / 216.91 MiB  1s
Copying blob 61e7f408068b: 133.89 MiB / 133.89 MiB  1s
Copying config 67edc4066f76: 1.27 KiB / 1.27 KiB  0s
Writing manifest to image destination
Storing signatures
67edc4066f7670aee82fbf19a6bd47f57effc4571c1e3f493c08f3715d93e989

# show container images

[root@dlp ~]#
podman images

REPOSITORY                 TAG      IMAGE ID       CREATED          SIZE
srv.world/centos_httpd     latest   67edc4066f76   37 seconds ago   368 MB
docker.io/library/centos   latest   0f3e07c0138f   8 days ago       227 MB

# confirm [httpd] to run container

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

httpd: /usr/sbin/httpd /usr/lib64/httpd /etc/httpd /usr/share/httpd /usr/share/man/man8/httpd.8.gz
Matched Content