FAQs
Install Docker
On Ubuntu
Ref: https://docs.docker.com/engine/install/ubuntu/
sudo apt-get update
# Uninstall old versions
sudo apt-get remove docker docker-engine docker.io containerd runc
# Install
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
# Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# Verify that you now have the key with the fingerprint 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88, by searching for the last 8 characters of the fingerprint.
sudo apt-key fingerprint 0EBFCD88
# Set up the stable repository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# INSTALL DOCKER ENGINE
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
# Verify that Docker Engine is installed correctly
sudo docker run hello-world
# Post-installation steps for Linux
sudo usermod -aG docker $USER
# Now you can log out and log into the machine and try without sudo
docker run hello-worldHow to display all containers with IPs
By default, docker ps can't display containers' IPs:
But it's quite flexible to custom the output. For example:
Last updated
Was this helpful?