Podman : Add Container Images2023/04/26 |
Add new Container images you modified settings.
|
|
[1] | For example, 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 c9bfca6d0ac2 6 days ago 196 MB # run a container and install [httpd] [root@dlp ~]# podman run fedora /bin/bash -c "dnf -y upgrade; dnf -y install httpd" podman ps -a | tail -1 5becc5a47698 registry.fedoraproject.org/fedora:latest /bin/bash -c dnf ... 55 seconds ago Exited (0) 12 seconds ago sharp_cartwright # add the image that [httpd] was installed [root@dlp ~]# podman commit 5becc5a47698 srv.world/fedora-httpd Getting image source signatures Copying blob 8f5d7501282e skipped: already exists Copying blob 2ad6b1807274 done Copying config 51d32e13e2 done Writing manifest to image destination Storing signatures 51d32e13e2f49b479ebc0d7908e802dfd06e651739ce307a65b2ea1513f37c24 # show container images [root@dlp ~]# podman images REPOSITORY TAG IMAGE ID CREATED SIZE srv.world/fedora-httpd latest 51d32e13e2f4 22 seconds ago 477 MB registry.fedoraproject.org/fedora latest c9bfca6d0ac2 6 days ago 196 MB # confirm [httpd] to run a container [root@dlp ~]# podman run srv.world/fedora-httpd /usr/sbin/httpd -V Server version: Apache/2.4.57 (Fedora Linux) Server built: Apr 11 2023 00:00:00 Server's Module Magic Number: 20120211:127 Server loaded: APR 1.7.2, APR-UTIL 1.6.3, PCRE 10.42 2022-12-11 Compiled using: APR 1.7.2, APR-UTIL 1.6.3, PCRE 10.42 2022-12-11 Architecture: 64-bit Server MPM: event threaded: yes (fixed thread count) forked: yes (variable process count) ..... ..... |
Sponsored Link |