Docker

Docker

Install Docker Engine on Ubuntu

https://docs.docker.com/engine/install/ubuntu/

Add Docker's official GPG key:

sudo apt-get update  
sudo apt-get install ca-certificates curl  
sudo install -m 0755 -d /etc/apt/keyrings  
############################################################################################################################################  
#sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc  
#sudo chmod a+r /etc/apt/keyrings/docker.asc  
sudo curl -fsSL https://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add -  
############################################################################################################################################  

Add the repository to Apt sources:

############################################################################################################################################  
#echo \  
#  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \  
#  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \  
#  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null  
sudo add-apt-repository "deb [arch=amd64] https://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable"  
############################################################################################################################################  
sudo apt-get update  

To install the latest version, run:

Verify that the Docker Engine installation is successful by running the hello-world image:


Allow a specific non-root user to run Docker commands, run:

Configure a proxy for Docker Engine, run:

Enable TCP port 2375 for external connection to Docker:

  1. /etc/docker/daemon.json

  1. /etc/systemd/system/docker.service.d/override.conf

  1. Reload

For Windows: Docker Desktop -> Settings -> General -> Expose daemon on tcp://localhost:2375 without TLS netsh interface portproxy add v4tov4 listenport=2375 listenaddress=172.16.X.XXX connectaddress=127.0.0.1 connectport=2375

Verify that the Expose daemon, run:

Last updated

Was this helpful?