二進位制檔案方式安裝Docker-CE
阿新 • • 發佈:2019-01-08
docker-ce提供了常用的linux發行版的安裝方式,但是離線安裝很多時候仍然是一個需要,這篇文章介紹瞭如何在centos上使用離線安裝包進行docker-ce版本的安裝,此方式適用於大部分docker離線安裝包的安裝方式。
OS
專案 | 作業系統 |
---|---|
No.1 | CentOS7/RHEL |
No.2 | 其他使用systemd的linux發行版 |
安裝方式
安裝主要進行了如下內容:
步驟 | 詳細內容 |
---|---|
Step 1 | 下載docker-ce的離線安裝包 |
Step 2 | 解壓出docker目錄 |
Step 3 | 將docker目錄下的內容拷貝到/usr/bin下並設定許可權 |
Step 4 | 設定docker的systemd設定檔案 |
Step 5 | 設定docker的開機啟動 |
Step 6 | 啟動docker |
Step 7 | 確認版本 |
安裝指令碼
安裝指令碼放到了如下github上
安裝指令碼 | https://github.com/liumiaocn/easypack/blob/master/docker/install-docker.sh |
---|
安裝方式
安裝說明
下載離線安裝包,然後將檔名作為引數傳給安裝指令碼即可
[[email protected] docker]# sh install-docker.sh
Usage: install-docker.sh FILE_NAME_DOCKER_CE_TAR_GZ
install-docker.sh docker-17.09.0-ce.tgz
Get docker-ce binary from: https://download.docker.com/linux/static/stable/x86_64/
eg: wget https://download.docker.com/linux/static/stable/x86_64/docker-17.09.0-ce.tgz
[[email protected] docker]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
安裝示例
下載目前最新的穩定版本的docker-ce,下載路徑為:https://download.docker.com/linux/static/stable/x86_64/
[[email protected] docker]# wget https://download.docker.com/linux/static/stable/x86_64/docker-17.09.0-ce.tgz
--2017-10-25 19:08:43-- https://download.docker.com/linux/static/stable/x86_64/docker-17.09.0-ce.tgz
Resolving download.docker.com (download.docker.com)... 54.182.1.17, 54.182.1.143, 54.182.1.160, ...
Connecting to download.docker.com (download.docker.com)|54.182.1.17|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 30365949 (29M) [application/x-tar]
Saving to: ‘docker-17.09.0-ce.tgz’
100%[==============================================================================================>] 30,365,949 101KB/s in 5m 35s
2017-10-25 19:14:25 (88.5 KB/s) - ‘docker-17.09.0-ce.tgz’ saved [30365949/30365949]
[[email protected] docker]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
安裝
[[email protected] docker]# sh install-docker.sh docker-17.09.0-ce.tgz
##unzip : tar xvpf docker-17.09.0-ce.tgz
docker/
docker/docker-containerd-shim
docker/docker-containerd
docker/docker-runc
docker/docker
docker/docker-init
docker/docker-containerd-ctr
docker/docker-proxy
docker/dockerd
##binary : docker copy to /usr/bin
/usr/bin/docker
##systemd service: docker.service
##docker.service: create docker systemd file
##Service status: docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: http://docs.docker.com
##Service restart: docker
##Service status: docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2017-10-25 19:18:43 EDT; 72ms ago
Docs: http://docs.docker.com
Main PID: 1414 (dockerd)
Memory: 16.5M
CGroup: /system.slice/docker.service
├─1414 /usr/bin/dockerd -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock --selinux-enabled=false --log-opt max-size=1g...
└─1418 docker-containerd -l unix:///var/run/docker/libcontainerd/docker-containerd.sock --metrics-interval=0 --start-timeo...
Oct 25 19:18:36 angular dockerd[1414]: time="2017-10-25T19:18:36.416541000-04:00" level=warning msg="failed to rename /var/lib...nously"
Oct 25 19:18:37 angular dockerd[1414]: time="2017-10-25T19:18:37.172916429-04:00" level=info msg="Graph migration to content-a...econds"
Oct 25 19:18:37 angular dockerd[1414]: time="2017-10-25T19:18:37.191385917-04:00" level=info msg="Loading containers: start."
Oct 25 19:18:41 angular dockerd[1414]: time="2017-10-25T19:18:41.000545493-04:00" level=info msg="Default bridge (docker0) is ...ddress"
Oct 25 19:18:42 angular dockerd[1414]: time="2017-10-25T19:18:42.933687222-04:00" level=info msg="Loading containers: done."
Oct 25 19:18:42 angular dockerd[1414]: time="2017-10-25T19:18:42.990164870-04:00" level=info msg="Docker daemon" commit=afdb6d...09.0-ce
Oct 25 19:18:42 angular dockerd[1414]: time="2017-10-25T19:18:42.991432362-04:00" level=info msg="Daemon has completed initialization"
Oct 25 19:18:43 angular systemd[1]: Started Docker Application Container Engine.
Oct 25 19:18:43 angular dockerd[1414]: time="2017-10-25T19:18:43.161695630-04:00" level=info msg="API listen on /var/run/docker.sock"
Oct 25 19:18:43 angular dockerd[1414]: time="2017-10-25T19:18:43.161959773-04:00" level=info msg="API listen on [::]:4243"
Hint: Some lines were ellipsized, use -l to show in full.
##Service enabled: docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
## docker version
Client:
Version: 17.09.0-ce
API version: 1.32
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:39:28 2017
OS/Arch: linux/amd64
Server:
Version: 17.09.0-ce
API version: 1.32 (minimum version 1.12)
Go version: go1.8.3
Git commit: afdb6d4
Built: Tue Sep 26 22:45:38 2017
OS/Arch: linux/amd64
Experimental: false
[[email protected] docker]#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
再分享一下我老師大神的人工智慧教程吧。零基礎!通俗易懂!風趣幽默!還帶黃段子!希望你也加入到我們人工智慧的隊伍中來!https://www.cnblogs.com/captainbed