Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Example search (for tomcat) images on Docker Hub

...

Panel
IMAGE CREATED CREATED BY SIZE COMMENT
09cfca98bf82 4 minutes ago /bin/sh -c #(nop) EXPOSE 80 0B
e0f8728488e3 4 minutes ago /bin/sh -c #(nop) CMD ["/usr/sbin/httpd" "-… 0B
fe1e985876af 4 minutes ago /bin/sh -c #(nop) COPY file:7aa92ce52044b7f0… 20B
4f0abf0cea3b 4 minutes ago /bin/sh -c yum -y update && yum -y install h… 283MB
cd2d92bc1c0c 2 weeks ago /bin/sh -c #(nop) CMD ["/bin/bash"] 0B
<missing> 2 weeks ago /bin/sh -c #(nop) ADD file:119ae574c5d5b6e59… 163MB


Update image from the running or stopped container

Code Block
sudo docker run -d -p 8000:80 kyivtank/amzn-phpinfo
docker exec -it e90a9e1ec094 bash


Code Block
echo "<?php echo 'Current PHP version: ' . phpversion(); ?>" >/var/www/html/version.php
exit


Code Block
docker ps


Code Block
CONTAINER ID        IMAGE                         COMMAND                  CREATED             STATUS              PORTS                                      NAMES
6aa53631dccd        kyivtank/amzn-phpinfo         "/usr/sbin/httpd -D …"   5 minutes ago       Up 5 minutes        0.0.0.0:8000->80/tcp                       gracious_antonelli


Code Block
docker commit  --message "Add version.php" 6aa53631dccd kyivtank/amzn-phpinfo2


Code Block
docker image history kyivtank/amzn-phpinfo2


Code Block
IMAGE               CREATED             CREATED BY                                      SIZE                COMMENT
f6ed0e8c64ec        About an hour ago   /usr/sbin/httpd -D FOREGROUND                   3kB                 Add version.php
09cfca98bf82        2 hours ago         /bin/sh -c #(nop)  EXPOSE 80                    0B
<missing>           2 hours ago         /bin/sh -c #(nop)  CMD ["/usr/sbin/httpd" "-…   0B
<missing>           2 hours ago         /bin/sh -c #(nop) COPY file:7aa92ce52044b7f0…   20B
<missing>           2 hours ago         /bin/sh -c yum -y update && yum -y install h…   283MB
<missing>           2 weeks ago         /bin/sh -c #(nop)  CMD ["/bin/bash"]            0B
<missing>           2 weeks ago         /bin/sh -c #(nop) ADD file:119ae574c5d5b6e59…   163MB


Push to Docker hub

Code Block
docker login
docker push kyivtank/amzn-phpinfo2


remove unused docker images

Code Block
docker image prune -a