Categories

CentOS 7 – Installation docker

Install docker on CentOS 7

  1. Désactiver Selinux
    [root@CentOS7 ~]# sestatus
    SELinux status:                 enabled
    SELinuxfs mount:                /sys/fs/selinux
    SELinux root directory:         /etc/selinux
    Loaded policy name:             targeted
    Current mode:                   enforcing
    Mode from config file:          enforcing
    Policy MLS status:              enabled
    Policy deny_unknown status:     allowed
    Max kernel policy version:      28
    [root@CentOS7 ~]# setenforce 0
    [root@CentOS7 ~]# sestatus
    SELinux status:                 enabled
    SELinuxfs mount:                /sys/fs/selinux
    SELinux root directory:         /etc/selinux
    Loaded policy name:             targeted
    Current mode:                   permissive
    Mode from config file:          enforcing
    Policy MLS status:              enabled
    Policy deny_unknown status:     allowed
    Max kernel policy version:      28
    [root@CentOS7 ~]#
  2. yum install docker
    [root@CentOS7 ~]# systemctl start docker
    [root@CentOS7 ~]# systemctl status docker
    ● docker.service – Docker Application Container Engine
       Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
       Active: active (running) since jeu. 2019-03-28 16:32:35 CET; 5s ago
         Docs: https://docs.docker.com
     Main PID: 563 (dockerd)
       Memory: 31.4M
       CGroup: /system.slice/docker.service
               └─563 /usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sockmars 28 16:32:34 CentOS7 dockerd[563]: time=”2019-03-28T16:32:34.546841983+01:00″ level=info msg=”Graph migration to content…econds”
    mars 28 16:32:34 CentOS7 dockerd[563]: time=”2019-03-28T16:32:34.547441461+01:00″ level=warning msg=”mountpoint for pids not found”
    mars 28 16:32:34 CentOS7 dockerd[563]: time=”2019-03-28T16:32:34.547794241+01:00″ level=info msg=”Loading containers: start.”
    mars 28 16:32:34 CentOS7 dockerd[563]: time=”2019-03-28T16:32:34.859828277+01:00″ level=info msg=”Default bridge (docker0) i…ddress”
    mars 28 16:32:35 CentOS7 dockerd[563]: time=”2019-03-28T16:32:35.087743390+01:00″ level=info msg=”Loading containers: done.”
    mars 28 16:32:35 CentOS7 dockerd[563]: time=”2019-03-28T16:32:35.118123390+01:00″ level=warning msg=”Not using native diff f…verlay2
    mars 28 16:32:35 CentOS7 dockerd[563]: time=”2019-03-28T16:32:35.118452119+01:00″ level=info msg=”Docker daemon” commit=d14a…18.09.4
    mars 28 16:32:35 CentOS7 dockerd[563]: time=”2019-03-28T16:32:35.118915954+01:00″ level=info msg=”Daemon has completed initialization”
    mars 28 16:32:35 CentOS7 dockerd[563]: time=”2019-03-28T16:32:35.229083074+01:00″ level=info msg=”API listen on /var/run/docker.sock”
    mars 28 16:32:35 CentOS7 systemd[1]: Started Docker Application Container Engine.
    Hint: Some lines were ellipsized, use -l to show in full.
    [root@CentOS7 ~]#PROXY DOCKER

    [root@CentOS7 ~]# cat /etc/sysconfig/docker
    HTTP_PROXY=http://85.254.112.20:8080/
    HTTPS_PROXY=https://85.254.112.20:8080/
    [root@CentOS7 ~]# systemctl restart docker
    [root@CentOS7 ~]#