shell> docker version
Client: Docker Engine - CommunityVersion: 19.03.14API version: 1.40Go version: go1.13.15Git commit: 5eb3275d40Built: Tue Dec 1 19:19:47 2020OS/Arch: linux/amd64Experimental: false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
啟動 docker
shell> systemctl start docker
查看 docker 運行狀態
shell> systemctl status docker
● docker.service - Docker Application Container EngineLoaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)Active: active (running) since Fri 2020-12-04 15:30:57 CST; 40s agoDocs: https://docs.docker.comMain PID: 208208 (dockerd)Tasks: 13Memory: 46.5MCGroup: /system.slice/docker.service└─208208 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sockDec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.252052950+08:00" level=info msg="[graphdriver] using prior storage driver: overlay2"
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.256586740+08:00" level=warning msg="Your kernel does not support cgroup blkio weight"
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.256605276+08:00" level=warning msg="Your kernel does not support cgroup blkio weight_device"
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.256720411+08:00" level=info msg="Loading containers: start."
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.358468112+08:00" level=info msg="Default bridge (docker0) is assigned with an IP address 172.17>
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.394937144+08:00" level=info msg="Loading containers: done."
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.411469411+08:00" level=info msg="Docker daemon" commit=5eb3275d40 graphdriver(s)=overlay2 versi>
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.411520020+08:00" level=info msg="Daemon has completed initialization"
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ dockerd[208208]: time="2020-12-04T15:30:57.425874550+08:00" level=info msg="API listen on /var/run/docker.sock"
Dec 04 15:30:57 iZ2ze55vge3erirrmw2mstZ systemd[1]: Started Docker Application Container Engine.
docker 版的 Hello World!
shell> docker run hello-worldHello from Docker!
This message shows that your installation appears to be working correctly.