Actions
Setup Docker in Ubuntu¶
Set up an Ununtu server - we will use 22.10
Update Package Index:
sudo apt update && apt upgrade
Install Prerequisites:
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
Add Docker Repository:
Your might have to install curl - apt install curl
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add the Docker repository:
For x86_64/amd64 architecture:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
For arm64 architecture:
echo "deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker:
sudo apt update sudo apt install -y docker-ce docker-ce-cli containerd.io
Start and Enable Docker:
sudo systemctl start docker
Run the following command to enable the Docker service to start on boot:
sudo systemctl enable docker
You can verify that the Docker service is set to start on boot by running:
sudo systemctl is-enabled docker
Verify Docker Installation:
sudo docker --version sudo docker info
Run a Test Container:
sudo docker run hello-world
Updated by Gareth Eaton over 1 year ago · 8 revisions