ubuntu14.04上安裝docker問題:
sudo apt-get update
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
查看docker版本:docker version
Client:
Version: 18.06.3-ce
API version: 1.38
Go version: go1.10.3
Git commit: d7080c1
Built: Wed Feb 20 02:27:13 2019
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 18.06.3-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.3
Git commit: d7080c1
Built: Wed Feb 20 02:25:38 2019
OS/Arch: linux/amd64
Experimental: false
然后測試docker是否可以運行:docker run hello-world
報錯顯示:
docker: Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "process_linux.go:297: copying bootstrap data to pipe caused \"write init-p: broken pipe\"": unknown.
ERRO[0000] error waiting for container: context cancele
查看內核版本:uname -r
3.13.0-119-generic
報錯原因:docker版本過高,內核版本過低造成。
解決辦法:降低docker的版本或升級內核版本。