Skip to main content
ubuntuask.com

Back to all posts

How to Install Docker In Ubuntu?

Published on
5 min read
How to Install Docker In Ubuntu? image

Best Docker Installation Tools to Buy in August 2026

1 Orblue Pizza Dough Docker Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Black

Orblue Pizza Dough Docker Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Black

  • EFFORTLESSLY CREATE PERFECT PIZZA CRUSTS WITH OUR EASY-TO-USE ROLLER.
  • QUICK CLEAN-UP: DISHWASHER SAFE FOR MORE TIME ENJOYING YOUR CREATIONS!
  • A PERFECT GIFT FOR COOKING ENTHUSIASTS TO ELEVATE THEIR PIZZA GAME!
BUY & SAVE
$9.99
Orblue Pizza Dough Docker Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Black
2 Pizza Dough Docker, Professional Dough Roller with Wooden Handle, Sturdy Pizza Docking Tool that Prevents Dough from Blistering, Time-Saver for Making Pizza Cookie Pie Pastry

Pizza Dough Docker, Professional Dough Roller with Wooden Handle, Sturdy Pizza Docking Tool that Prevents Dough from Blistering, Time-Saver for Making Pizza Cookie Pie Pastry

  • DURABLE DESIGN: CRAFTED WITH STAINLESS STEEL SPIKES AND WOODEN HANDLE.

  • VERSATILE TOOL: PERFECT FOR PIZZAS, COOKIES, PIES, AND PASTRIES.

  • EFFICIENT & EASY TO CLEAN: QUICK DOUGH PREPARATION, RINSE UNDER FAUCET.

BUY & SAVE
$12.99
Pizza Dough Docker, Professional Dough Roller with Wooden Handle, Sturdy Pizza Docking Tool that Prevents Dough from Blistering, Time-Saver for Making Pizza Cookie Pie Pastry
3 EVEDMOT Pizza Dough Docker Roller Stainless Steel,Pin Puncher Docking Tool

EVEDMOT Pizza Dough Docker Roller Stainless Steel,Pin Puncher Docking Tool

  • DURABLE DESIGN: SOLID WOOD HANDLE & STAINLESS STEEL PINS FOR LONGEVITY.
  • VERSATILE USE: PERFECT FOR PIZZA, PASTRIES, PIES, AND MORE!
  • TIME-SAVING TOOL: SPEED UP DOUGH PREPARATION FOR DELICIOUS RESULTS.
BUY & SAVE
$12.87
EVEDMOT Pizza Dough Docker Roller Stainless Steel,Pin Puncher Docking Tool
4 Pizza Dough Docker, Premium Dough Roller with Stainless Steel Spikes, Sturdy Pizza Docking Tool that Prevents Dough from Blistering, Time-Saver for Making Pizza Cookie Pie Pastry

Pizza Dough Docker, Premium Dough Roller with Stainless Steel Spikes, Sturdy Pizza Docking Tool that Prevents Dough from Blistering, Time-Saver for Making Pizza Cookie Pie Pastry

  • DURABLE DESIGN: CRAFTED FROM FOOD-GRADE STAINLESS STEEL FOR LONGEVITY.
  • VERSATILE USE: PERFECT FOR PIZZAS, COOKIES, PIES, AND MORE!
  • TIME-SAVING TOOL: SPEEDS UP DOUGH DOCKING, MAKING BAKING A BREEZE.
BUY & SAVE
$12.91
Pizza Dough Docker, Premium Dough Roller with Stainless Steel Spikes, Sturdy Pizza Docking Tool that Prevents Dough from Blistering, Time-Saver for Making Pizza Cookie Pie Pastry
5 EVEDMOT Pizza Dough Docker Roller Stainless Steel,Pin Puncher Docking Tool

EVEDMOT Pizza Dough Docker Roller Stainless Steel,Pin Puncher Docking Tool

  • DURABLE FOOD-GRADE STAINLESS STEEL PINS FOR LONG-LASTING USE.
  • VERSATILE TOOL FOR PERFECTING PIZZA CRUSTS AND PASTRIES QUICKLY.
  • IDEAL GIFT FOR BAKING LOVERS-PERFECT FOR ANY SPECIAL OCCASION!
BUY & SAVE
$12.87
EVEDMOT Pizza Dough Docker Roller Stainless Steel,Pin Puncher Docking Tool
6 Orblue Pizza Dough Docker, Pastry Roller with Spikes Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering Light Gray

Orblue Pizza Dough Docker, Pastry Roller with Spikes Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering Light Gray

  • EFFORTLESSLY CREATE PERFECT PIZZA CRUSTS EVERY TIME-GREAT FOR BEGINNERS!

  • QUICK AND EASY CLEAN-UP; SPEND MORE TIME ENJOYING YOUR CREATIONS!

  • A MUST-HAVE GIFT FOR COOKING ENTHUSIASTS-BOOST THEIR PIZZA GAME!

BUY & SAVE
$9.99
Orblue Pizza Dough Docker, Pastry Roller with Spikes Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering Light Gray
7 Orblue Pizza Dough Docker, Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Red

Orblue Pizza Dough Docker, Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Red

  • EFFORTLESS DOUGH PREP: PERFECT FOR FIRST-TIME BAKERS; NO SKILLS NEEDED!
  • VERSATILE USE: IDEAL FOR PIZZA, PIES, COOKIES, AND BISCUITS WITH EASE.
  • EASY CLEAN-UP: FAST CLEANING; DISHWASHER SAFE FOR MORE PIZZA TIME!
BUY & SAVE
$9.99
Orblue Pizza Dough Docker, Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Red
8 Pizza Dough Docker Docker Dough Bubble killer Time-Saver Pizza Dough Roller Docker Dough Blistering Killer Pizza Docker Roller for Home Kitchen Pizza Making Accessories Pizza Docking Tool

Pizza Dough Docker Docker Dough Bubble killer Time-Saver Pizza Dough Roller Docker Dough Blistering Killer Pizza Docker Roller for Home Kitchen Pizza Making Accessories Pizza Docking Tool

  • EFFORTLESSLY CREATE PERFECT PIZZA CRUSTS WITH EVEN DOUGH COVERAGE.
  • ERGONOMIC HANDLE AND EASY-CLEAN DESIGN FOR ULTIMATE CONVENIENCE.
  • IDEAL GIFT FOR COOKING FANS, ELEVATING THEIR BAKING EXPERIENCE!
BUY & SAVE
$6.59
Pizza Dough Docker Docker Dough Bubble killer Time-Saver Pizza Dough Roller Docker Dough Blistering Killer Pizza Docker Roller for Home Kitchen Pizza Making Accessories Pizza Docking Tool
9 Orblue Pizza Dough Docker, Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Aqua

Orblue Pizza Dough Docker, Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Aqua

  • EFFORTLESSLY CREATE PERFECT PIZZA CRUSTS EVERY TIME, EVEN FOR BEGINNERS!

  • QUICK AND EASY CLEANUP-SPEND MORE TIME ENJOYING YOUR CREATIONS!

  • IDEAL GIFT FOR COOKING ENTHUSIASTS-ENHANCE THEIR PIZZA MAKING EXPERIENCE!

BUY & SAVE
$9.99 $15.99
Save 38%
Orblue Pizza Dough Docker, Pastry Roller with Spikes, Pizza Docking Tool for Home & Commercial Kitchen - Pizza Making Accessories that Prevent Dough from Blistering, Aqua
10 Mangocore 16x7x3.1cm High Grade Stainless Steel Noodle Lattice Roller Docker Dough Cutter Pasta Spaghetti Maker for Kitchen Cooking Tools

Mangocore 16x7x3.1cm High Grade Stainless Steel Noodle Lattice Roller Docker Dough Cutter Pasta Spaghetti Maker for Kitchen Cooking Tools

  • RUST-PROOF 304 STAINLESS STEEL FOR SAFE, HEALTHY COOKING.
  • MULTI-PURPOSE TOOL FOR EFFORTLESS KITCHEN NOODLE CUTTING.
  • 360-DEGREE CUTTING FOR NEAT, UNIFORM NOODLES EVERY TIME.
BUY & SAVE
$9.99
Mangocore 16x7x3.1cm High Grade Stainless Steel Noodle Lattice Roller Docker Dough Cutter Pasta Spaghetti Maker for Kitchen Cooking Tools
+
ONE MORE?

To install Docker in Ubuntu, follow these steps:

  1. Update the package index by running the command: sudo apt update
  2. Install the necessary packages to allow apt to use a repository over HTTPS: sudo apt install apt-transport-https ca-certificates curl software-properties-common
  3. Import Docker’s official GPG key using the following command: curl -fsSL https://download.[docker](https://geekblog.net/blog/how-to-start-minikube-with-docker).com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
  4. Add the Docker repository to your system sources: 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
  5. Update the package index again: sudo apt update
  6. Install Docker by running the command: sudo apt install docker-ce docker-ce-cli containerd.io
  7. Verify that Docker is installed correctly by running the following command, which should output the Docker version: docker --version
  8. Additionally, you may want to run Docker without sudo by adding your user to the "docker" group: sudo usermod -aG docker $USER
  9. After adding your user to the "docker" group, you will need to log out and back in for the changes to take effect.

That's it! Docker is now successfully installed on your Ubuntu system.

Is it possible to install Docker in a specific directory in Ubuntu?

Yes, it is possible to install Docker in a specific directory in Ubuntu. By default, Docker is installed in the root directory "/var/lib/docker". However, you can choose a different directory during the installation process.

To install Docker in a specific directory, follow these steps:

  1. Update the system packages:

sudo apt update

  1. Install Docker dependencies:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

  1. Add the Docker repository key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

  1. Add the Docker repository:

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

  1. Update the system packages again:

sudo apt update

  1. Install Docker:

sudo apt install docker-ce docker-ce-cli containerd.io

  1. Stop the Docker service:

sudo systemctl stop docker

  1. Create a directory to store the Docker data:

sudo mkdir /path/to/directory

  1. Modify the Docker service options:

sudo nano /lib/systemd/system/docker.service

  1. Add the following line to the '[Service]' section, replacing "/path/to/directory" with the desired directory path:

ExecStart=/usr/bin/dockerd -g /path/to/directory

  1. Save the file and exit the editor.
  2. Reload the systemd configuration:

sudo systemctl daemon-reload

  1. Start the Docker service:

sudo systemctl start docker

Now, Docker will be installed and configured to use the specified directory for storing its data.

How do I start and stop the Docker service in Ubuntu?

To start and stop the Docker service in Ubuntu, follow these steps:

  1. Open a terminal.
  2. Start the Docker service by running the following command: sudo service docker start
  3. To check the status of the Docker service, you can run the following command: sudo service docker status This will display if the service is running or not.
  4. To stop the Docker service, use the following command: sudo service docker stop This will stop the Docker service and any running containers.

Note: If you are using a newer version of Ubuntu (e.g., Ubuntu 20.04 or later) that uses systemd as the init system, you can use the following commands instead:

  • Start Docker: sudo systemctl start docker
  • Check Docker status: sudo systemctl status docker
  • Stop Docker: sudo systemctl stop docker

How do I uninstall Docker from Ubuntu?

To uninstall Docker from Ubuntu, you can follow these steps:

  1. First, open a terminal window.
  2. Stop any running Docker containers by executing the following command: sudo docker stop $(sudo docker ps -a -q)
  3. Remove all Docker containers from your system with the command: sudo docker rm $(sudo docker ps -a -q)
  4. Next, uninstall the Docker package by running the following command: sudo apt-get purge docker-ce docker-ce-cli containerd.io
  5. To remove all Docker images, volumes, and other leftover files, execute: sudo rm -rf /var/lib/docker
  6. If you have any specific Docker-related configurations or directories, remove them as well.
  7. Finally, to remove the Docker repository from the list of repositories on your system, run: sudo rm /etc/apt/sources.list.d/docker.list

Now you have successfully uninstalled Docker from your Ubuntu system.

Is it necessary to install additional packages or dependencies for Docker in Ubuntu?

No, it is not necessary to install additional packages or dependencies for Docker in Ubuntu, as Docker comes with a pre-built package for Ubuntu that includes all the necessary dependencies. However, depending on your specific use case, you may need to install additional packages or dependencies for Docker, such as specific Docker images or network utilities.

The recommended method for installing Docker in Ubuntu is to use the Docker official installation script. Here are the steps to install Docker:

  1. Update the local package index:

sudo apt-get update

  1. Install required packages to use HTTPS:

sudo apt-get install apt-transport-https ca-certificates curl software-properties-common

  1. Add the Docker official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

  1. Add the Docker repository to APT sources:

For x86_64/amd64 architecture:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

For armhf architecture:

sudo add-apt-repository "deb [arch=armhf] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

  1. Update the package index again:

sudo apt-get update

  1. Install the latest version of Docker CE (Community Edition):

sudo apt-get install docker-ce

  1. Verify that Docker is installed correctly by running the "hello-world" image:

sudo docker run hello-world

This will pull a test image and run it in a container. If everything is set up correctly, you should see a "Hello from Docker!" message.