01. Docker installation

1. Install Docker
##1. Install curl command
sudo apt-get install curl

##2. Download and install docker
curl -sSL https://get.docker.com/ | sh
 
 
2. Start Docker
1. Start
sudo service docker start
 
2. Verify that the startup was successful
docker version
 
 
3. Possible problems
If the following error occurs:
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.26/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
 
You need to add the current user to the docker group, and then log in again.
sudo usermod -a -G docker $USER
 

Guess you like

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