How to Install Docker on Ubuntu?
Easy setup guide to install docker on Ubuntu.
Follow me on LinkedIn to Learn and Grow Together: Click Here
Step-1 Update Package Index
sudo apt update
Step 2: Install Dependencies to Enable HTTPS APT
java -version
Step 3: Add Docker’s GPG Key
openjdk version "21.0.1" 2023-10-17
Step 4: Set Up the Stable Docker Repository
wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -
Step 5: Install Docker Engine
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
Step 6: Check Docker Version
sudo docker version
Step 7: Verify the Docker Installation
sudo docker run hello-world
This command downloads a test image and runs a container. If everything is set up correctly, you should see a “Hello from Docker!” message indicating that your Docker installation is working.
Step 7: Manage Docker as a Non-Root User (Optional)
If you want to avoid using sudo
each time you run a Docker command, you can add your user to the docker
group:
sudo usermod -aG docker $USER
Share it as much as you can and Follow for more blog content for you all, Thank you for your support❤️
To know more about me check my portfolio: https://yatharthchauhan.me
Connect with me:
LinkedIn: Click Here
GitHub: Click Here
Instagram: Click Here
Fiverr: Click Here
Medium: Click Here