Debian 10 Buster
Sponsored Link

Docker : Add Container images2019/07/24

 
Add Container images you created.
[1] For exmaple, update official image with installing Apache2 and add it as a new image for container. The container is generated every time for executing docker run command, so add the latest executed container like follows.
# show images

root@dlp:~#
docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
debian              latest              00bf7fdd8baf        2 weeks ago         114MB

# start a Container and install apache2

root@dlp:~#
docker run debian /bin/bash -c "apt-get update; apt-get -y install apache2"

root@dlp:~#
docker ps -a | head -2

CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                       PORTS               NAMES
f273ecfea032        debian              "/bin/bash -c 'apt-g…"   36 seconds ago      Exited (0) 7 seconds ago                         loving_cocks

# add the image

root@dlp:~#
docker commit f273ecfea032 srv.world/debian_apache2

sha256:4295df3e5c82c024da75f82181b00004e2a3e4c5fcbe120dc8e3a2a74705f545

root@dlp:~#
docker images
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
srv.world/debian_apache2   latest              4295df3e5c82        13 seconds ago      243MB
debian                     latest              00bf7fdd8baf        2 weeks ago         114MB

# Generate a Container from the new image and execute [which] to make sure httpd exists

root@dlp:~#
docker run srv.world/debian_apache2 /usr/bin/which apache2

/usr/sbin/apache2
Matched Content