Podman : Add Container Images2023/06/21 |
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/debian latest 49081a1edb0b 8 days ago 121 MB # run a container and install [apache2] root@dlp:~# podman run debian /bin/bash -c "apt-get update; apt-get -y install apache2" podman ps -a | tail -1 ec2ab97e352a docker.io/library/debian:latest /bin/bash -c apt-... About a minute ago Exited (0) About a minute ago adoring_kalam # add the image that [apache2] was installed root@dlp:~# podman commit ec2ab97e352a srv.world/debian-apache2 Getting image source signatures Copying blob 332b199f36eb skipped: already exists Copying blob 622e3a22918b done Copying config f047c6f28c done Writing manifest to image destination Storing signatures f047c6f28c56a68c2881a7a2a7a24850d38e0c1c5ca59e6a632e34cf3d60e723 # show container images root@dlp:~# podman images REPOSITORY TAG IMAGE ID CREATED SIZE srv.world/debian-apache2 latest f047c6f28c56 20 seconds ago 260 MB docker.io/library/debian latest 49081a1edb0b 8 days ago 121 MB # confirm [apache2] to run a container root@dlp:~# podman run srv.world/debian-apache2 /usr/bin/whereis apache2 apache2: /usr/sbin/apache2 /usr/lib/apache2 /etc/apache2 /usr/share/apache2 /usr/share/man/man8/apache2.8.gz |
Sponsored Link |