Install the mechanism of Docker not Debian (2023)

To get started with Docker Engine on Debian, make sure tomeet the requirements, ThenInstalar Docker.

previous requirements

operating system requirements

To install Docker Engine, you need the 64-bit version of one of these Debian or Raspbian versions:

  • Debian Bullseye 11 (stable)
  • Debian Buster 10 (alterar Stall)
  • Raspbian Bullseye 11 (stable)
  • Raspbian Buster 10 (alterar Stall)

Docker Engine is compatible with conx86_64amd64),Arm, jbrazo64architectures

uninstall old versions

Earlier versions of Docker were named afterStauer,, ÖDocker-Engine. Uninstall all previous versions before trying to install a new version:

p.s sudoapt-get remove docker docker-engine containerd runc

it's ok yesapt-getreports that none of these packages are installed.

Images, containers, volumes and networks stored in/var/lib/docker/They are not automatically removed when you uninstall Docker. If you are starting with a clean install and prefer to erase existing data, read theUninstall Docker EngineSection.

installation methods

You can install Docker Engine in different ways depending on your needs:

  • Docker Engine is includedDocker Desktop para Linux. This is the easiest and fastest way to get started.

  • You can also configure and install Docker Engine fromDocker apt-Repository.

  • install it manuallyand manage updates manually.

  • wearing acomfort scripts. It is only recommended for test and development environments. This is the only approach available for Raspbian.

Install using repository

Before installing Docker Engine on a new host machine for the first time, you need to set up the Docker repository. You can then install and update Docker from the repository.

Raspbian users cannot use this method.

Repository installation is not yet supported by Raspbian. Instead, you should use theConvenience Route.

Configure the repository

  1. To updateadjustIndex of packages and installation packages to activateadjustTo use a repository over HTTPS:

    p.s sudoapt-get updatep.s sudoapt-getTo install \CA certificates\reis\group\lsb version
    (Video) Docker Tutorial - Docker overview - Install docker-compose on Debian 10
  2. Add the official Docker gpg key:

    p.s sudo mkdir -Metro0755- book page/etc/apt/keychainsp.s reis-fsSL |sudogpg-Liber /etc/apt/keyrings/docker.gpg
  3. Use the following command to configure the repository:

    p.s Eco \ "deb [arq=p.sdpkg--print architecture)signed by =/etc/apt/keyrings/docker.gpg]\ p.slsb_release-cs)stable"|Sweater/etc/apt/sources.list.d/docker.list>/dev/null

Install the Docker Engine

This method still works for Debianx86_64/amd64,Arm,brazo64e Raspbian.

  1. To updateadjustpackage index:

    p.s sudoapt-get update

    Getting a GPG error when runningapt-get update?

    its default valuemaskmay be misconfigured, preventing detection of the repository's public key file. Try granting read permission to the Dockerpublic key file before updating the package index:

    p.s sudo chmoda+r /etc/apt/keyrings/docker.gpgp.s sudoapt-get update
  2. Instale o Docker Engine, containerd e Docker Compose.

    To install the latest version, run:

    p.s sudoapt-getTo installdocker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin
    (Video) Install Docker on Debian

    To install a specific version of Docker Engine, first list the available versions in the repository:

    # List available versions:p.s apt-cache madison docker-ce |ach '{ print $3 }'5:18.09.1~3-0~debian-stretch5:18.09.0~3-0~debian-stretch18.06.1~ce~3-0~debian18.06.0~ce~3-0~debian

    Select the desired version and install it:

    p.s VERSION_STRING=5:18.09.0~3-0~debian-stretchp.s sudoapt-getTo installdocker-ce=$VERSION_STRINGdocker-ce-cli=$ docker-buildx-plugin docker-compose-plugin
  3. Verify that the Docker Engine installation was successful by running theHello WorldPhoto:

    p.s sudodocker start hello world

    This command downloads a test image and runs it in a container. If the container is running, it will print a confirmation message and exit.

You have now successfully installed and started the Docker Engine. HeStauerThe usergroup exists, but it doesn't contain any users, so you should usesudoto run Docker commands. sequence followspost-installation of linuxto allow unprivileged users to run Docker commands, and for other optional configuration steps.

Update the Docker engine

To update Docker Engine follow theinstallation guideand select the new version you want to install.

Install from a package

If you can't use DockeradjustRepository to install Docker Engine, you can download itdebutanteto publish and install it manually. You need to download a new file every time you want to update Docker Engine.

  1. Becomes

    (Video) Running Linux desktop environments in containers

  2. Select your Debian version from the list.

  3. Becomespool/barn/and select the applicable architecture (amd64,Arm,brazo64, Ös390x).

  4. Download the followingdebutanteFiles for Docker Engine, CLI, containerd and Docker Compose packages:

    • containerd.io_<Version>_<Date>.deb
    • Docker-ce_<Version>_<File>.deb
    • Docker-ce-cli_<Version>_<Architecture>.deb
    • docker-buildx-plugin_<version>_<architecture>.deb
    • docker-compose-plugin_<version>_<file>.deb
  5. install this.debutantePackages In the example below, update the paths to where you downloaded Docker packages.

    p.s sudodpkg-EU./containerd.io_<Versão>_<The book>.debutante\./docker-ce_<Version>_<The book>.debutante\./docker-ce-cli_<version>_<The book>.debutante\./docker-buildx-plugin_<version>_<The book>.debutante\./docker-compose-plugin_<version>_<The book>.debutante

    The Docker daemon starts automatically.

  6. Verify that the Docker Engine installation was successful by running theHello WorldPhoto:

    p.s sudoStart service dockerp.s sudodocker start hello world

    This command downloads a test image and runs it in a container. If the container is running, it will print a confirmation message and exit.

You have now successfully installed and started the Docker Engine. HeStauerThe usergroup exists, but it doesn't contain any users, so you should usesudoto run Docker commands. sequence followspost-installation of linuxto allow unprivileged users to run Docker commands, and for other optional configuration steps.

Update the Docker engine

To update Docker Engine, download the latest package file and rerun theinstallation process, points to the new file.

Install using a convenience script

Docker provides a handy script at not install Docker interactively in development environments. The convenience script is not recommended for production environments, but it is useful for creating a deployment script tailored to your needs. See also theinstall from repositorySteps for information about installation steps to install using the package store. The script's source code is open source and can be found atDocker-InstalarRepository on GitHub.

Always check scripts downloaded from the web before running them locally. Before installing, familiarize yourself with the possible risks and limitations of the convenience script:

  • The script requiressourceÖsudoexecute privileges.
  • The script attempts to detect your Linux distribution and version and configure your package management system for you.
  • The script does not allow customizing most installation parameters.
  • The script installs dependencies and recommendations without asking for confirmation. This can install a large number of packages depending on the current configuration of your host machine.
  • By default, the script installs the latest stable versions of docker, containerd and runc. Using this script to provision a machine may result in unexpected updates to the major version of Docker. Always test updates in a staging environment before deploying them to your production systems.
  • The script is not designed to update an existing Docker installation. If the script is used to update an existing installation, dependencies might not be updated to the expected version, resulting in outdated versions.

Tip: Preview script steps before running them

You can run the script with- dry runningOption to know what steps the script will take when invoked:

p.s reis-fsSLhttps://get.docker.comget-docker.shp.s sudosh ./ dry running
(Video) How to Install Docker on Debian/Ubuntu/CentOS ? Yes, I Know IT ! Ep 15

In this example, the script is downloaded from run it to install the latest stable version of Docker on Linux:

p.s reis-fsSLhttps://get.docker.comget-docker.shp.s sudosh get-docker.shExecute o script do instalador do Docker e confirme: 7cae5f8b0decc17d6571f9f52eb840fbc13b2737<...>

You have now successfully installed and started the Docker Engine. HeStauerThe service starts automatically on Debian-based distributions. Innumber of revolutionsbased distributions such as CentOS, Fedora, RHEL or SLES, you must start it manually via thesystemctlÖServiceDomain. According to the message, non-root users cannot run Docker commands by default.

Use docker as unprivileged user or install in rootless mode?

The installation script requiressourceÖsudoPermissions to install and use Docker. If you want to give non-root users access to Docker, read thePost-installation steps for Linux.You can also install Docker without itsourceHave permissions or be configured to run in rootless mode. For instructions on how to run Docker in non-root mode, seeRun docker daemon as non-root user (non-root mode).

Install preview builds

Docker also provides a handy script at install pre-release versions of Docker on Linux. This script is the same as the script, but configure your package manager to use the test channel from the Docker package repository. The test channel includes both stable and preview versions (beta versions, release candidates) of Docker. Use this script to get early access to new versions and test them in a staging environment before releasing them as stable.

To install the latest version of Docker on Linux from the test channel, run:

p.s reis-fsSLhttps://test.docker.comprueba-docker.shp.s sudosh

Update Docker after using convenience script

If you installed Docker using the convenience script, update Docker directly from your package manager. There is no benefit to running the convenience script again. Reruns can cause problems when trying to reinstall repositories that already exist on the host machine.

Uninstall Docker Engine

  1. Uninstall the Docker Engine, CLI, containerd and Docker Compose packages:

    p.s sudoapt-get purge docker-ce docker-ce-cli docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
  2. Your host's custom images, containers, volumes, or configuration files are not automatically removed. To remove all images, containers and volumes:

    p.s sudo rm -rf/var/lib/dockerp.s sudo rm -rf/var/lib/container
    (Video) Docker Beginner Tutorial 5 - How to install DOCKER on LINUX ? Step by Step

You must delete all manually edited configuration files.

Next steps

  • sequence followsPost-installation steps for Linux.
  • check the themesDevelop with Dockerto learn how to build new apps with Docker.


How do I know if debian is Docker installed? ›

To check if you have Docker installed, run command docker ps or docker info on a terminal screen to verify it is installed and running. If the command is not found, you may need to install Docker first.

Where is Docker daemon JSON on debian? ›

The default location of the configuration file on Linux is /etc/docker/daemon. json .

How to install Docker Compose on debian 9? ›

How to Install Docker Compose on Debian 9
  1. Step 1: Connect via SSH. Connect to your server via SSH as the root user using the following command: ssh root@IP_ADDRESS -p PORT_NUMBER. ...
  2. Step 2: Install Dependency packages. ...
  3. Step 3: Setting Up Docker Repository. ...
  4. Step 4: Installing Docker CE. ...
  5. Step 5: Testing Docker CE.
Dec 18, 2020

How install deb file terminal Debian? ›

Installing deb package on Ubuntu/Debian
  1. Install gdebi tool and then open and install the . deb file using it.
  2. Use dpkg and apt-get command line tools as follows: sudo dpkg -i /absolute/path/to/deb/file sudo apt-get install -f.

How do I get NPM on Debian? ›

Installing NodeJS with apt
  1. Run the apt install command below to install NodeJS and NPM on your Debian 11 system. $ sudo apt install nodejs npm -y.
  2. Run the following commands to verify that NodeJS and NPM are installed properly. $ node -v v12.22.5 $ npm -v 7.5.2.
Feb 18, 2022

How do I know if my Debian is 32 or 64 bit? ›

How to find if Linux is running on 32-bit or 64-bit
  1. Open the Linux terminal application.
  2. Type uname -a to print system information.
  3. Run getconf LONG_BIT to see if Linux kernel is 32 or 64 bit.
  4. Execute grep -o -w 'lm' /proc/cpuinfo command to determine if you are using 32 or 64 bit CPU.
Apr 4, 2021

What is docker Debian? ›

Docker is a solution for the management of lightweight process containers. Docker can be installed from buster (or newer) repositories (see the package). Docker upstream also provides packages (for multiple different debian version):

How to install latest docker Compose on Debian? ›

Update the package index, and install the latest version of Docker Compose:
  1. For Ubuntu and Debian, run: $ sudo apt-get update $ sudo apt-get install docker-compose-plugin.
  2. For RPM-based distros, run: $ sudo yum update $ sudo yum install docker-compose-plugin.

Where are Docker containers stored Debian? ›

On a linux system, docker stores data pertaining to images, containers, volumes, etc under /var/lib/docker.

What is the default Docker daemon directory? ›

The Docker daemon persists all data in a single directory. This tracks everything related to Docker, including containers, images, volumes, service definition, and secrets. By default this directory is: /var/lib/docker on Linux.

Where are Docker volumes stored Debian? ›

Volumes are stored in a part of the host filesystem which is managed by Docker ( /var/lib/docker/volumes/ on Linux). Non-Docker processes should not modify this part of the filesystem. Volumes are the best way to persist data in Docker.

Do you need sudo to install docker? ›

The installation script requires root or sudo privileges to install and use Docker. If you want to grant non-root users access to Docker, refer to the post-installation steps for Linux. You can also install Docker without root privileges, or configured to run in rootless mode.

Can I install docker without sudo? ›

If you don't want to preface the docker command with sudo , create a Unix group called docker and add users to it. When the Docker daemon starts, it creates a Unix socket accessible by members of the docker group.

How install Debian package in Linux? ›

You can install a downloaded Debian package using dpkg in a terminal: dpkg -i *. deb (where *. deb is the path and name of the package you downloaded).
Debian package
  1. SearchPackages.
  2. deb file format in Wikipedia.
  3. DebianPackage.
  4. udeb.
  5. /etc/apt/sources. list.
Jan 19, 2022

How to install deb file in Debian 11? ›

If you're using Linux Mint, you can install the DEB file now through Gdebi by double-clicking it in your file manager and selecting Install Package. If you're using Ubuntu or Debian and want to use the Gdebi GUI, open your file manager, right-click the DEB file, and select Open with Other Application.

What does sudo apt install do? ›

You run sudo apt-get upgrade to install available upgrades of all packages currently installed on the system from the sources configured via sources. list file. New packages will be installed if required to satisfy dependencies, but existing packages will never be removed.

Does Debian have an installer? ›

Debian Installer, also known as “d-i”, is the software system to install a basic working Debian system. A wide range of hardware such as embedded devices, laptops, desktops and server machines is supported and a large set of free software for many purposes is offered.

How to install Node in Debian Linux? ›

How to Install Node.js on Debian
  1. Step 1: Install the curl Command.
  2. Step 2: Add PPA to the System.
  3. Step 3: Update Repository.
  4. Step 4: Install Node.js.
  5. Step 5: Verify the Installation.
Oct 6, 2022

How to upgrade npm version in Debian? ›

To update Node using NPM, do the following:
  1. Open the Terminal and check your current Node version: node -v.
  2. Install n package using the following command: npm install -g n. ...
  3. To update Node, run the following command in your terminal: n latest. ...
  4. Now you can verify that your update is complete by rechecking your Node version:
Dec 21, 2022

How do I manually download Debian packages? ›


You can do a manual download from When you are on the page of the package, choose a distribution, and you will have a link to the three files which make the source package.

Is Debian 64bit? ›

The architecture is AMD64-compatible and Debian AMD64 will run on AMD and Intel processors with 64-bit support. Because of the technology paternity, Debian uses the name "AMD64".

How do I know which Debian system I have? ›

By typing “lsb_release -a”, you can get information about your current Debian version as well as all other base versions in your distribution. By typing “lsb_release -d”, you can get an overview of all system information, including your Debian version.

How do you tell if you should install 32-bit or 64-bit? ›

Click the Start button, then choose Settings. Select System. Choose About. Check the bit version on the System type field.

Why is Debian called Debian? ›

Founding (1993–1998) Debian was first announced on August 16, 1993, by Ian Murdock, who initially called the system "the Debian Linux Release". The word "Debian" was formed as a portmanteau of the first name of his then-girlfriend (later ex-wife) Debra Lynn and his own first name.

What is Debian mainly used for? ›

Debian offers over 59,000 packages that support a wide range of capabilities. For example, Debian provides packages for editing documents, developing software, administering systems, connecting to networks, debugging packages, mixing sound, routing email and playing games.

How do I install updates on Debian? ›

How to install a Debian update manually?
  1. grep security /etc/apt/sources. list | tee /etc/apt/security. sources. list.
  2. apt-get update.
  3. apt-get upgrade -o Dir::Etc::SourceList=/etc/apt/security. sources. list.
  4. Type Y and press Enter. Security updates will be installed and your system will be up to date.

How do I upgrade to the latest version of Debian? ›

  1. Upgrading Debian 10 to Debian 11. Step 1: Back up Data (Optional) Step 2: Update Existing Packages and Repositories. Step 3: Install the gcc-8-base Package. Step 4: Update the Sources File with Bullseye Repositories. Step 5: Update Repository with New Sources. Step 6: Upgrade System to Debian 11. ...
  2. Debian 11 Bullseye Features.
Dec 21, 2022

How do I get latest packages in Debian? ›

How to Debian upgrade or update a single package
  1. Open the Terminal application by visiting menus in the GUI.
  2. Update package index by running sudo apt update command.
  3. Now only update nginx package by running sudo apt install nginx command.
  4. If nginx package already installed it will try to update to the latest version.
Aug 5, 2020

How do I find out where docker is installed Linux? ›

The storage location of Docker images and containers

Here is an overview for the most used operating systems: Ubuntu: /var/lib/docker/ Fedora: /var/lib/docker/ Debian: /var/lib/docker/

How do I find my docker containers? ›

In order to list the Docker containers, we can use the “docker ps” or “docker container ls” command. This command provides a variety of ways to list and filter all containers on a particular Docker engine.

How to clean docker cache? ›

Cleaning local docker cache
  1. docker system df.
  2. docker ps --filter status=exited --filter status=dead -q.
  3. docker rm $(docker ps --filter=status=exited --filter=status=dead -q)
  4. docker container prune.
  5. docker ps -q.
  6. docker stop $(docker ps -q)
  7. docker rm $(docker ps -a -q)
  8. docker images --filter dangling=true -q.
Jun 2, 2021

How can I tell if Docker daemon is installed? ›

The operating-system independent way to check whether Docker is running is to ask Docker, using the docker info command. You can also use operating system utilities, such as sudo systemctl is-active docker or sudo status docker or sudo service docker status , or checking the service status using Windows utilities.

How to start Docker daemon in Linux? ›

  1. Create a systemd drop-in directory for the docker service: $ sudo mkdir -p /etc/systemd/system/docker.service.d.
  2. Flush changes and restart Docker. $ sudo systemctl daemon-reload $ sudo systemctl restart docker.

How to set Docker root directory? ›

  1. Stop the Docker services: ...
  2. Create the necessary directory structure into which to move Docker root by running the following command. ...
  3. Move Docker root to the new directory structure: ...
  4. Edit the file /etc/docker/daemon.json. ...
  5. After the /etc/docker/daemon.json file is saved and closed, restart the Docker services:

How to mount local directory to docker container? ›

How to Mount Local Directories using docker run -v. Using the parameter -v allows you to bind a local directory. -v or --volume allows you to mount local directories and files to your container. For example, you can start a MySQL database and mount the data directory to store the actual data in your mounted directory.

How do I check my docker volumes? ›

You can use the docker volume ls command to view a list of data volumes. Use the docker volume inspect command to view the data volume details.

How to check docker volume path? ›

Volumes are also stored as part of the host file system, which is managed by Docker. On Linux, volumes are stored in “/var/lib/docker/volume”.

Why sudo is needed for Docker? ›

Running Docker commands with sudo ensures that the Docker command is executed with the security rights of root (by using sudo) or by a user who is a member of the docker group.

Should I install Docker as root? ›

Processes in a container should not run as root, or assume that they are root. Instead, create a user in your Dockerfile with a known UID and GID, and run your process as this user. Images that follow this pattern are easier to run securely by limiting access to resources.

What is sudo Docker command? ›

A sys admin can use the sudo command to grant users access to Docker containers. To prevent security risks, understand the implications of sudo, root access and Docker groups. The root user accesses the Docker daemon and sockets on the host, with the ability to read and write images.

How to install Docker without root access? ›

Run Docker as a non-root user
  1. To run Docker as a non-root user, you have to add your user to the docker group.
  2. Create a docker group if there isn't one: $ sudo groupadd docker.
  3. Add your user to the docker group: ...
  4. Log out and log back in so that your group membership is re-evaluated.

What do you need to install Docker? ›

Go to the website and download the docker file. Note: A 64-bit processor and 4GB system RAM are the hardware prerequisites required to successfully run Docker on Windows 10. 2. Then, double-click on the Docker Desktop Installer.exe to run the installer.

Can Docker run without operating system? ›

You would need an OS. The best would be to have a lean OS. Few options that could explore in that case is alpine + docker, rancher os, core os. You could use the scratch base image in your Dockerfile, depending on what you needed to run.

Which command is used to install a Debian package *? ›

Install Software Using Dpkg Command

Dpkg is a package manager for Debian and its derivatives such as Ubuntu and Linux Mint. It is used to install, build, remove and manage . deb packages.

How do you check if Debian package is installed? ›

To check if a specific package is installed on Debian based Linux distributions, you can use the dpkg command followed by the -s (status) flag and the package name.

What is a Debian package in Linux? ›

A Debian "package", or a Debian archive file, contains the executable files, libraries, and documentation associated with a particular suite of program or set of related programs. Normally, a Debian archive file has a filename that ends in . deb .

How to install docker Compose Debian 10? ›

Installing Docker Compose on Debian 10
  1. Use chmod to make the Compose binary executable: sudo chmod +x /usr/local/bin/docker-compose.
  2. To verify the installation, use the following command which prints the Compose version: docker-compose --version.
Dec 15, 2019

Can I install docker on Linux? ›

Docker Engine comes bundled with Docker Desktop for Linux. This is the easiest and quickest way to get started. You can also set up and install Docker Engine from Docker's apt repository.

How do I get the latest version of Debian? ›

By typing “lsb_release -a”, you can get information about your current Debian version as well as all other base versions in your distribution. By typing “lsb_release -d”, you can get an overview of all system information, including your Debian version.

Where do Debian packages get installed? ›

Debian already comes with pre-approved sources to get packages from and this is how it installs all the base packages you see on your system (if a user did a net-install). On a Debian system, this sources file is the "/etc/apt/sources.

How do I install programs on Debian? ›

Run sudo apt-get install packageName to install the package.

Replace packageName with the actual package name. For example, if you want to install the package dillo (that's a web browser), you would type sudo apt-get install dillo .

How to install Docker in Linux manually? ›

Install from a package

If you can't use Docker's repository to install Docker, you can download the .rpm file for your release and install it manually. You need to download a new file each time you want to upgrade Docker Engine. Go to and choose your version of CentOS.

How to properly install Docker Linux? ›

Install Docker
  1. Log into your system as a user with sudo privileges.
  2. Update your system: sudo yum update -y .
  3. Install Docker: sudo yum install docker-engine -y.
  4. Start Docker: sudo service docker start.
  5. Verify Docker: sudo docker run hello-world.

How to setup a Docker in Linux? ›

To create the docker group and add your user:
  1. Create the docker group. $ sudo groupadd docker.
  2. Add your user to the docker group. $ sudo usermod -aG docker $USER.
  3. Log out and log back in so that your group membership is re-evaluated. ...
  4. Verify that you can run docker commands without sudo .

Is Debian easy to install? ›

Debian offers a flexible Installer.

It also includes the Calamares installer which makes it easy to install Debian from the live system. More experienced users can use the Debian installer with more options for fine-tuning, including the possibility to use an automated network installation tool.


1. Docker Tutorial - Docker overview - Install Docker CE on Debian 10
(Paris Nakita Kejser)
2. Docker Desktop for Linux Servers Setup and Tips
(Bret Fisher Docker and DevOps)
3. How To Install Docker Engine on Debian Based Systems
4. Docker Complete Setup on Windows (With WSL Ubuntu)
(The Codeholic)
5. How to install latest Docker CE on Ubuntu Linux Debian and Verify
6. Run docker command without sudo in Ubuntu | Docker for beginners #2
Top Articles
Latest Posts
Article information

Author: Kerri Lueilwitz

Last Updated: 02/20/2023

Views: 6547

Rating: 4.7 / 5 (67 voted)

Reviews: 82% of readers found this page helpful

Author information

Name: Kerri Lueilwitz

Birthday: 1992-10-31

Address: Suite 878 3699 Chantelle Roads, Colebury, NC 68599

Phone: +6111989609516

Job: Chief Farming Manager

Hobby: Mycology, Stone skipping, Dowsing, Whittling, Taxidermy, Sand art, Roller skating

Introduction: My name is Kerri Lueilwitz, I am a courageous, gentle, quaint, thankful, outstanding, brave, vast person who loves writing and wants to share my knowledge and understanding with you.