Getting started with docker

A long time ago, a virtual machine was built, and it has not been used since it was built. Recently, I was thinking of using it on a whim, and it seemed like a lifetime after a few months. Organize and record.

centos 7.X

1. I forgot whether I installed docker or not. Execute the command which docker and the result /usr/bin/docker indicates that docker has been installed. 2. Execute the docker ps command, and the problem of "Cannot connect to the Docker daemon at unix:///var/run/docker.sock . . . " appears. Solution: At this point, it has been determined that Docker itself has been installed normally. The reason for the problem is that because the docker service is not started, the docker process cannot be found in the corresponding /var/run/ path. Execute the service docker start command to start the docker service.

Now docker has started.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324999443&siteId=291194637