FreeBSD 14
Sponsored Link

Podman : Add Container Images2024/02/28

 
Add new Container images you modified settings.
[1] As an example, we will install Apache httpd on the FreeBSD base image we created here and register it as a new container image.
root@dlp:~ #
podman images

REPOSITORY                TAG         IMAGE ID      CREATED       SIZE
localhost/freebsd-base    latest      2527bfa5eeb4  19 hours ago  1.05 GB
quay.io/centos/centos     stream9     ce3ac91d4020  13 days ago   161 MB
docker.io/library/ubuntu  latest      3db8720ecbf5  2 weeks ago   80.4 MB

# run a container and install [apache24]

root@dlp:~ #
podman run freebsd-base /bin/sh -c "pkg install -y apache24"

root@dlp:~ #
podman ps -a | tail -1

66415c21bff7  localhost/freebsd-base:latest    /bin/sh -c pkg in...  26 seconds ago     Exited (0) 6 seconds ago                  boring_easley

# add the image that [apache24] was installed

root@dlp:~ #
podman commit 66415c21bff7 localhost/freebsd-httpd

Getting image source signatures
Copying blob e08c67379022 skipped: already exists
Copying blob 93ffa0e6d857 done   |
Copying config add46dedb2 done   |
Writing manifest to image destination
add46dedb2b7667084366b5ee744ec9ce5db6c85ebdf838cf1a9e972ab10f27e

root@dlp:~ #
podman images

REPOSITORY                TAG         IMAGE ID      CREATED         SIZE
localhost/freebsd-httpd   latest      add46dedb2b7  23 seconds ago  1.44 GB
localhost/freebsd-base    latest      2527bfa5eeb4  20 hours ago    1.05 GB
quay.io/centos/centos     stream9     ce3ac91d4020  13 days ago     161 MB
docker.io/library/ubuntu  latest      3db8720ecbf5  2 weeks ago     80.4 MB

# confirm [apache24] to run a container

root@dlp:~ #
podman run freebsd-httpd /usr/local/sbin/httpd -V

Server version: Apache/2.4.58 (FreeBSD)
Server built:   unknown
Server's Module Magic Number: 20120211:129
Server loaded:  APR 1.7.3, APR-UTIL 1.6.3, PCRE 10.42 2022-12-11
Compiled using: APR 1.7.3, APR-UTIL 1.6.3, PCRE 10.42 2022-12-11
Architecture:   64-bit
Server MPM:     prefork
  threaded:     no
    forked:     yes (variable process count)
.....
.....
Matched Content