Podman : コンテナーイメージを登録する2025/10/31 |
|
コンテナー用のイメージファイルを新規登録するには以下のように設定します。 |
|
| [1] | 例として、公式からダウンロードした既存のイメージファイルのシステムに [httpd] をインストールして、[httpd] 入りのイメージを新規登録します。 コンテナーは [run] する毎に新しいものが生成されるため、コンテナー環境を最新化して [exit] した後に、直近のコンテナーを登録対象とします。 |
|
# 現在登録されているイメージ一覧を表示 dlp:~ # podman images REPOSITORY TAG IMAGE ID CREATED SIZE registry.opensuse.org/opensuse/leap latest 004d9956dc10 2 weeks ago 118 MB # 最新のイメージでコンテナーを起動し [apache2] をインストール dlp:~ # podman run opensuse/leap /bin/bash -c "zypper -n install apache2" podman ps -a | tail -1 a53e4afbd38e registry.opensuse.org/opensuse/leap:latest /bin/bash -c zypp... About a minute ago Exited (0) 6 seconds ago laughing_feistel # [apache2] インストール済みイメージを登録 dlp:~ # podman commit a53e4afbd38e srv.world/suse-httpd Getting image source signatures Copying blob 565e8c1e4903 skipped: already exists Copying blob e4f7acf0fbaa done | Copying config 155ffb9ef2 done | Writing manifest to image destination 155ffb9ef27d0735e5c22eac7919b00e000b49428ad245d7a4eb44d3654d428b # 確認 dlp:~ # podman images REPOSITORY TAG IMAGE ID CREATED SIZE srv.world/suse-httpd latest 155ffb9ef27d 28 seconds ago 393 MB registry.opensuse.org/opensuse/leap latest 004d9956dc10 2 weeks ago 118 MB # 登録したイメージからコンテナーを生成し [apache2] 確認 dlp:~ # podman run srv.world/suse-httpd /usr/sbin/httpd -V
Server version: Apache/2.4.58 (Linux/SUSE)
Server built: 2025-07-21 02:11:38.000000000 +0000
Server's Module Magic Number: 20120211:129
Server loaded: APR 1.6.3, APR-UTIL 1.6.1, PCRE 10.42 2022-12-11
Compiled using: APR 1.6.3, APR-UTIL 1.6.1, PCRE 10.42 2022-12-11
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
.....
.....
|
| Sponsored Link |
|
|