[2] Dodanie obrazu kontenera
24 lipca 2020[1] Zmodyfikujemy oficjalny obraz kontenera poprzez instalację [httpd] i dodamy go jako nowy obraz.
# pokaż kontenery [root@lsr01vm ~]# podman images REPOSITORY TAG IMAGE ID CREATED SIZE docker.io/library/centos latest 831691599b88 5 weeks ago 223 MB # uruchom kontener i zainstaluj [httpd] [root@lsr01vm ~]# podman run centos /bin/bash -c "dnf -y upgrade; dnf -y install httpd" [root@lsr01vm ~]# podman ps -a | head -2 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 27b604ee2a63 docker.io/library/centos:latest /bin/bash -c dnf ... 25 seconds ago Exited (0) 10 seconds ago busy_elbakyan # dodaj kontener gdzie zainstalowano [httpd] [root@lsr01vm ~]# podman commit 27b604ee2a63 zicher.lab/centos_httpd Getting image source signatures Copying blob eb29745b8228 skipped: already exists Copying blob 45e818cf51b8 done Copying config 20386223eb done Writing manifest to image destination Storing signatures 20386223ebaaa931e83339705ad07df1555e54076a896b475a73cb88f7e27329 # pokaż obrazy kontenerów [root@lsr01vm ~]# podman images REPOSITORY TAG IMAGE ID CREATED SIZE zicher.lab/centos_httpd latest 20386223ebaa About a minute ago 270 MB docker.io/library/centos latest 831691599b88 5 weeks ago 223 MB # potwierdź uruchomienie kontenera z [httpd] [root@lsr01vm ~]# podman run zicher.lab/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
[…] [1] Użyjemy wcześniej zainstalowanej usługi [httpd]. […]