1. 程式人生 > 實用技巧 >TypeScript 資料型別---列舉 (Enum)

TypeScript 資料型別---列舉 (Enum)

1.版本

  1. 選擇的版本是17.03.2,
  2. 安裝包為ce和selinux,這倆即可。docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm和docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
  3. 下載地址為清華源
  4. 系統版本為CentOS-7.4

2.安裝方式

  1. 由於需要,採用離線安裝,所以需要很多依賴,具體離線依賴的安裝方式,請參考我的部落格
    yum離線安裝

  2. 安裝所需要的依賴庫之後,開始安裝docker。

yum install docker-ce-selinux-17.03.2.ce-1.el7.centos.noarch.rpm
yum install docker-ce-17.03.2.ce-1.el7.centos.x86_64.rpm
  1. 安裝成功之後,修改配置檔案
vim /etc/systemd/system/docker.service
  1. docker.service內容
[Unit]

Description=Docker Application Container Engine

Documentation=https://docs.docker.com

After=network-online.target firewalld.service

Wants=network-online.target

[Service]

Type=notify

# the default is not to use systemd for cgroups because the delegate issues still

# exists and systemd currently does not support the cgroup feature set required

# for containers run by docker

ExecStart=/usr/bin/dockerd

ExecReload=/bin/kill -s HUP $MAINPID

# Having non-zero Limit*s causes performance problems due to accounting overhead

# in the kernel. We recommend using cgroups to do container-local accounting.

LimitNOFILE=infinity

LimitNPROC=infinity

LimitCORE=infinity

# Uncomment TasksMax if your systemd version supports it.

# Only systemd 226 and above support this version.

#TasksMax=infinity

TimeoutStartSec=0

# set delegate yes so that systemd does not reset the cgroups of docker containers

Delegate=yes

# kill only the docker process, not all processes in the cgroup

KillMode=process

# restart the docker process if it exits prematurely

Restart=on-failure

StartLimitBurst=3

StartLimitInterval=60s

 

[Install]

WantedBy=multi-user.target
  1. docker啟動
chmod +x /etc/systemd/system/docker.service             # 新增檔案許可權並啟動docker

systemctl daemon-reload                                 # 過載unit配置檔案

Systemctl start docker                                  # 啟動docker
systemctl enable docker.service                         # 設定開機自啟
  1. 檢查
systemctl status docker                                 # 檢視docker狀態
docker -v                                               # 檢視docker版本