title: Duplicate installation of docker from both iso and apt
body: <h2>question</h2>
  <p>A virtual machine of mine is ubuntu, docker is installed when install ubuntu from iso. After that, I installed again from apt, because previous one is not registered in &quot;systemctl&quot;. Now , there is <code>two space for both docker</code>, just like following.</p>
  <ol>
  <li>Two docker have their own space for &quot;docker ps / image CMD&quot; .</li>
  <li>Reboot start with &quot;SPACE docker A&quot;, and &quot;systemctl status&quot; works good. Once &quot;systemctl restart&quot;, move to &quot;SPACE docker B&quot;.</li>
  <li>If I want remove &quot;SPACE docker A&quot;. How can I do it? I would be very grateful if any suggestion is given.</li>
  <li>For now, my workaround is <code>manually systemctl restart</code> every time.</li>
  </ol>
  <h2>appendix</h2>
  <pre><code>root@wzhjworkmachine:~/gitRoot# echo &quot;now I reboot&quot;
  now I reboot
  root@wzhjworkmachine:~/gitRoot# systemctl status docker
  ● docker.service - Docker Application Container Engine
       Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
       Active: active (running) since Mon 2020-08-24 04:12:19 UTC; 1min 10s ago
  TriggeredBy: ● docker.socket
         Docs: https://docs.docker.com
     Main PID: 941 (dockerd)
        Tasks: 11
       Memory: 118.5M
       CGroup: /system.slice/docker.service
               └─941 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
  
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.395653457Z&quot; level=warning msg=&quot;Your kernel does not support cgroup rt runtime&quot;
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.395739427Z&quot; level=warning msg=&quot;Your kernel does not support cgroup blkio weight&quot;
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.395827870Z&quot; level=warning msg=&quot;Your kernel does not support cgroup blkio weight_device&quot;
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.396046259Z&quot; level=info msg=&quot;Loading containers: start.&quot;
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.631892982Z&quot; level=info msg=&quot;Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --&gt;
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.666930410Z&quot; level=info msg=&quot;Loading containers: done.&quot;
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.719311959Z&quot; level=info msg=&quot;Docker daemon&quot; commit=afacb8b7f0 graphdriver(s)=overlay2 version=19.03.8
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.720376021Z&quot; level=info msg=&quot;Daemon has completed initialization&quot;
  Aug 24 04:12:19 wzhjworkmachine systemd[1]: Started Docker Application Container Engine.
  Aug 24 04:12:19 wzhjworkmachine dockerd[941]: time=&quot;2020-08-24T04:12:19.752861257Z&quot; level=info msg=&quot;API listen on /run/docker.sock&quot;
  root@wzhjworkmachine:~/gitRoot# docker ps -a
  CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
  root@wzhjworkmachine:~/gitRoot# docker image ls
  REPOSITORY                                               TAG                 IMAGE ID            CREATED             SIZE
  wzhjv001                                                 v1                  0127641f0d76        2 days ago          867MB
  hub.ark.jd.com/wzhj-compile-image4jenkins/quickcompile   gov1.14             0127641f0d76        2 days ago          867MB
  root@wzhjworkmachine:~/gitRoot# systemctl restart docker
  root@wzhjworkmachine:~/gitRoot# systemctl status docker
  ● docker.service - Docker Application Container Engine
       Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
       Active: active (running) since Mon 2020-08-24 04:13:45 UTC; 6s ago
  TriggeredBy: ● docker.socket
         Docs: https://docs.docker.com
     Main PID: 2103 (dockerd)
        Tasks: 12
       Memory: 38.4M
       CGroup: /system.slice/docker.service
               └─2103 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
  
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.183475793Z&quot; level=warning msg=&quot;Your kernel does not support cgroup rt runtime&quot;
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.183480494Z&quot; level=warning msg=&quot;Your kernel does not support cgroup blkio weight&quot;
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.183485240Z&quot; level=warning msg=&quot;Your kernel does not support cgroup blkio weight_device&quot;
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.183615822Z&quot; level=info msg=&quot;Loading containers: start.&quot;
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.269534194Z&quot; level=info msg=&quot;Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option -&gt;
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.303140798Z&quot; level=info msg=&quot;Loading containers: done.&quot;
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.313875267Z&quot; level=info msg=&quot;Docker daemon&quot; commit=afacb8b7f0 graphdriver(s)=overlay2 version=19.03.8
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.314078704Z&quot; level=info msg=&quot;Daemon has completed initialization&quot;
  Aug 24 04:13:45 wzhjworkmachine dockerd[2103]: time=&quot;2020-08-24T04:13:45.326129124Z&quot; level=info msg=&quot;API listen on /run/docker.sock&quot;
  Aug 24 04:13:45 wzhjworkmachine systemd[1]: Started Docker Application Container Engine.
  root@wzhjworkmachine:~/gitRoot# docker ps -a
  CONTAINER ID        IMAGE               COMMAND             CREATED              STATUS                          PORTS               NAMES
  1d09c0866672        9f266d35e02c        &quot;/bin/bash&quot;         About a minute ago   Exited (0) About a minute ago                       intelligent_rhodes
  root@wzhjworkmachine:~/gitRoot# docker image ls
  REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
  centos              7.4.1708            9f266d35e02c        17 months ago       197MB
  </code></pre>