<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Docker - Tag - Mulinux | Linux &amp; DevOps Notes</title>
    <link>https://blog.mulinux.com/en/tags/docker/</link>
    <description>Mulinux - Linux Operations &amp; DevOps blog. Notes on Linux, Kubernetes, Docker and backend engineering.</description>
    <generator>Hugo 0.160.0 &amp; FixIt v0.4.5</generator>
    <language>en</language>
    <lastBuildDate>Tue, 16 Oct 2018 17:39:00 +0800</lastBuildDate>
    <atom:link href="https://blog.mulinux.com/en/tags/docker/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Docker Image Management</title>
      <link>https://blog.mulinux.com/en/docker-image/</link>
      <pubDate>Tue, 16 Oct 2018 17:39:00 +0800</pubDate>
      <guid>https://blog.mulinux.com/en/docker-image/</guid>
      <category domain="https://blog.mulinux.com/en/categories/operations/">Operations</category>
      <description>&lt;h2 class=&#34;heading-element&#34; id=&#34;install-docker&#34;&gt;&lt;span&gt;Install Docker&lt;/span&gt;&#xA;  &lt;a href=&#34;#install-docker&#34; class=&#34;heading-mark&#34;&gt;&#xA;    &lt;svg class=&#34;octicon octicon-link&#34; viewBox=&#34;0 0 16 16&#34; version=&#34;1.1&#34; width=&#34;16&#34; height=&#34;16&#34; aria-hidden=&#34;true&#34;&gt;&lt;path d=&#34;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&lt;pre&gt;&lt;code&gt;Centos6.6_x64&#xA;[root@web1 ~]# uname -a&#xA;Linux web1.mulinux.com 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux&#xA;[root@web1 ~]# yum install -y epel-release&#xA;[root@web1 ~]# yum install -y docker-io&#xA;[root@web1 ~]# /etc/init.d/docker start&#xA;[root@web1 ~]# ps aux | grep docker&#xA;root 1591 1.0 1.4 287656 14224 pts/0 Sl 18:30 0:00 /usr/bin/docker -d&#xA;root 1709 0.0 0.0 103244 864 pts/0 S&amp;#43; 18:31 0:00 grep docker&lt;/code&gt;&lt;/pre&gt;&lt;h2 class=&#34;heading-element&#34; id=&#34;image-management&#34;&gt;&lt;span&gt;Image Management&lt;/span&gt;&#xA;  &lt;a href=&#34;#image-management&#34; class=&#34;heading-mark&#34;&gt;&#xA;    &lt;svg class=&#34;octicon octicon-link&#34; viewBox=&#34;0 0 16 16&#34; version=&#34;1.1&#34; width=&#34;16&#34; height=&#34;16&#34; aria-hidden=&#34;true&#34;&gt;&lt;path d=&#34;m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z&#34;&gt;&lt;/path&gt;&lt;/svg&gt;&#xA;  &lt;/a&gt;&#xA;&lt;/h2&gt;&lt;pre&gt;&lt;code&gt;[root@web1 ~]# docker pull centos&#xA;latest: Pulling from centos&#xA;47d44cb6f252: Pull complete &#xA;6fdebd7b0eb5: Pull complete &#xA;a63aae4d216f: Pull complete &#xA;bb3d629a7cbc: Pull complete &#xA;Digest: sha256:381f21e4c7b3724c6f420b2bcfa6e13e47ed155192869a2a04fa10f944c78476&#xA;Status: Downloaded newer image for centos:latest&#xA;[root@web1 ~]# docker images&#xA;REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE&#xA;centos latest bb3d629a7cbc 2 weeks ago 196.6 MB&#xA;[root@web1 ~]# docker tag centos mulinux123&#xA;[root@web1 ~]# docker images&#xA;REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE&#xA;centos latest bb3d629a7cbc 2 weeks ago 196.6 MB&#xA;mulinux123 latest bb3d629a7cbc 2 weeks ago 196.6 MB  &#xA;[root@web1 ~]# docker run -it centos /bin/bash #start a container from image&#xA;[root@32c67b2b18e0 /]# w&#xA; 12:30:01 up 2:09, 0 users, load average: 0.06, 0.01, 0.00&#xA;USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT&#xA;[root@32c67b2b18e0 /]# exit&#xA;exit&#xA;[root@web1 ~]# docker ps #list running containers&#xA;[root@web1 ~]# docker ps -a #list all containers including stopped&#xA;CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES&#xA;32c67b2b18e0 centos &amp;#34;/bin/bash&amp;#34; 2 minutes ago Exited (0) About a minute ago modest_kowalevski &#xA;[root@web1 ~]# docker images&#xA;REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE&#xA;centos latest bb3d629a7cbc 2 weeks ago 196.6 MB&#xA;mulinux123 latest bb3d629a7cbc 2 weeks ago 196.6 MB&#xA;[root@web1 ~]# docker rmi bb3d629a7cbc #deleting by ID removes all images with same ID&#xA;[root@web1 ~]# docker rmi mulinux123&#xA;Untagged: mulinux123:latest&#xA;[root@web1 ~]# docker images&#xA;REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE&#xA;centos latest bb3d629a7cbc 2 weeks ago 196.6 MB&#xA;[root@web1 ~]# docker tag centos centos:mulinux&#xA;[root@web1 ~]# docker images&#xA;REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE&#xA;centos latest bb3d629a7cbc 2 weeks ago 196.6 MB&#xA;centos mulinux bb3d629a7cbc 2 weeks ago 196.6 MB&#xA;[root@web1 ~]# docker rmi centos:mulinux&#xA;Untagged: centos:mulinux&#xA;[root@web1 ~]# docker images&#xA;REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE&#xA;centos latest bb3d629a7cbc 2 weeks ago 196.6 MB&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
  </channel>
</rss>
