linux下通過二進位制檔案安裝docker

2022-07-26 03:30:20 字數 1626 閱讀 5594

2,解壓二進位制檔案

tar xzvf docker-18.03.1-ce.tgz

3,複製二進位制檔案到/usr/bin目錄下

cp docker/* /usr/bin/

4,檢查是否安裝

docker version

client:

version:      18.03.1-ce

api version:  1.37

go version:   go1.9.2

git commit:   9ee9f40

built:        thu apr 26 07:12:25 2018

os/arch:      linux/amd64

experimental: false

orchestrator: swarm

server:

engine:

version:      18.03.1-ce

api version:  1.37 (minimum version 1.12)

go version:   go1.9.5

git commit:   9ee9f40

built:        thu apr 26 07:23:03 2018

os/arch:      linux/amd64

experimental: false

5,配置 docker.service檔案

vi /usr/lib/systemd/system/docker.service

[service]

type=notify

execstart=/usr/bin/dockerd

execreload=/bin/kill -s hup $mainpid

limitnofile=infinity

limitnproc=infinity

timeoutstartsec=0

delegate=yes

killmode=process

restart=on-failure

startlimitburst=3

startlimitinterval=60s

[install]

wantedby=multi-user.target

6,啟動dockerd服務程序

systemctl daemon-reload

systemctl start docker.service

7.拉取映象

docker pull centos:centos7

如果拉取映象報錯

錯誤資訊:get net/http: request canceled while waiting for connection (client.timeout exceeded while awaiting headers)

因為預設映象源是國外的,速度比較慢,就會導致超時報錯

所以換成國內的映象源來加速

vim /etc/docker/daemon.json(新增網易映象)

systemctl daemon-reload

重啟docker

systemctl restart docker

linux 通過 echo 寫二進位制檔案

1.簡單用法 推薦 echo 001122334455 xxd r ps test 6 個位元組xxd xxd 命令用於用二進位制或十六進製制顯示檔案的內容 r 把xxd的十六進製制輸出內容轉換回原檔案的二進位制內容 ps 以 postscript的連續十六進製制轉儲輸出,這也叫做純十六進製制轉儲 ...

二進位制檔案

本質上是文字檔案是把檔案資訊先轉化成以字元編碼的ascii碼,再儲存ascii的二進位制 而二進位制檔案是直接把檔案資訊編碼成二進位制儲存。因此在讀取的時候要考慮記憶體中二進位制 應該怎麼樣解釋。二進位制檔案的讀取是是要告訴元素的型別 編碼方式 文字檔案則預設為char型別。文字檔案是一種特殊的二進...

二進位制檔案

二進位制檔案 也叫型別檔案 二進位制檔案是由一批同一型別的資料組成的乙個資料序列,就是說乙個具體的二進位制檔案只能存放同一種型別的資料。type tmember record name string 10 email string 20 posts longint end var members a...