Docker installed ubuntu and the centos

Docker Introduction

Docker use Google launched the Go language development based on Linux kernel cgroup, namespace, and Union FS and other AUFS class technology, encapsulation process isolation, belonging to the virtualization operating system level.

Docker Component Description

LXC
Linux container technology, shared core, shared host container resources, the use of namespace and cgroups to resource constraints and isolation.
Cgroups (control groups)
limiting single-process or multi-process resource mechanism provided by the Linux kernel; use restrictions such as CPU, memory and other resources.
NameSpace
namespace, also known name space, a limitation single-process or multi-process resource isolation mechanism provided by the Linux kernel; a process can belong to multiple namespaces. Linux kernel provides six NameSpace: UTS, IPC, PID, Network, Mount and User.
AUFS (advanced multi layered unification filesystem)
Senior multilayered unified file system is a UFS, each branch can specify readonly (ro read-only), readwrite (reading and writing) and whiteout-able (wo hidden) rights; general next, aufs only the topmost branch have read and write permissions, the other branch is read-only privileges.
UFS (UnionFS)
jointly file system directory in different locations of the same support to mount virtual file system, the formation of a layered model; members of the directory is called a virtual file system branch (branch).

Docker installed in the ubuntu

  1. System version
    Ubuntu 16.04
    Docker latest version default
  2. Aufs storage drivers install the docker
    apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
  3. Installation System Package
    apt-get install apt-transport-https ca-certificates curl software-properties-common
  4. Add docker official GPG key
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
  5. Set stable stable warehouse
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \> $(lsb_release -cs) \> stable"
  1. View warehouse
    cat sources.list | grep docker
  2. Update apt package
    apt-get update
  3. Installation docker-ce
    apt-get install docker-ce

  4. Start docker see the version number
systemctl start 
dockerdocker version
# docker versionClient: Version:           18.09.0 
API version:       1.39 
Go version:        go1.10.4
Git commit:        4d60db4 
Built:             Wed Nov  7 00:48:57 2018 
OS/Arch:           linux/amd64 
Experimental:      false 
Server: Docker Engine - Community 
Engine:  Version:          18.09.0  
API version:      1.39 (minimum version 1.12)  
Go version:       go1.10.4  
Git commit:       4d60db4  Built:            Wed Nov  7 00:16:44 2018  OS/Arch:          linux/amd64  
Experimental:     false 

Docker mounted at the centos

  1. system version

  2. In the open mirror sites Tsinghua find the latest docker installed mirror
  3. Copy the file docker-ce.repo
     wget https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo
  4. Edit docker.repo file
    :%s@https://download.docker.com@https://mirrors.tuna.tsinghua.edu.cn/docker-ce@
  5. Check availability
    yum repolist
  6. Install and check the version number
    yum install docker-ce -y
    systemctl start docker
    docker version

Installation instructions Docker environment

  • Dependent basic environment
    • 64 bit cpu
    • Linux Kernel 3.10+
    • Linux Kernel cgroups and namespaces
  • CentOS 7
    • "Extras " repository
  • Docker Daemon
    • systemctl start docker.service
  • Docker client
    • docker [OPTIONS] COMMAND [arg..]
  • Docker program environment
    • Environment Profile
      • /etc/sysconfig/docker-network
      • /etc/sysconfig/docker-storage
      • /etc/sysconfig/docker
    • Unit File
      • /usr/lib/systemd/system/docker.service
    • Docker Registry Profiles
      • /etc/containers/registries.conf
    • Docker Mirror accelerate
      • Added daemon.json
      {
      "registry-mirrors": ["https://registry.docker-cn.com"]
      }

Guess you like

Origin www.cnblogs.com/dyb0204/p/11345129.html