• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to install Docker in Debian 12

  • 00:46 lsb_release -a
  • 00:52 sudo apt-get update
  • 01:06 sudo apt-get install ca-certificates curl
  • 01:16 sudo install -m 0755 -d /etc/apt/keyrings
  • 01:18 sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
  • 01:21 sudo chmod a+r /etc/apt/keyrings/docker.asc
  • 01:24 echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ $(. /etc/os-release && echo "$VERSION_CODENAME") stable"
  • 01:29 sudo apt-get update
  • 01:43 sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
  • 02:11 sudo docker run hello-worl
  • 02:33 docker pull httpd
  • 03:02 docker images
  • 03:13 docker run -d --name apache -p 81:80 httpd
{{postValue.id}}

How to install Docker in Debian 12

Introduction

Docker is an open platform designed for the development, deployment, and operation of applications. It allows you to decouple your applications from the underlying infrastructure, facilitating rapid software delivery. With Docker, you can manage your infrastructure in a manner consistent with how you manage your applications. By leveraging Docker's methodologies for shipping, testing, and deploying code, you can substantially minimize the time from code creation to production execution.

Procedure

Step 1: Check the OS Version of your System

root@linuxhelp:/# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 12 (bookworm)
Release:	12
Codename:	bookworm

Step 2: Update your repository

root@linuxhelp:/# sudo apt-get update
Hit:1 http://deb.debian.org/debian bookworm InRelease
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
Get:3 http://security.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://security.debian.org/debian-security bookworm-security/main Sources [145 kB]
Get:5 http://security.debian.org/debian-security bookworm-security/main amd64 Packages [246 kB]
Fetched 495 kB in 2s (221 kB/s)                         
Reading package lists... Done

Step 3: Install the Docker Repository to your repository

root@linuxhelp:/# sudo apt-get install ca-certificates curl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20230311).
The following NEW packages will be installed:
  curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 315 kB of archives.
After this operation, 500 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 curl amd64 7.88.1-10+deb12u8 [315 kB]
Unpacking curl (7.88.1-10+deb12u8) ...
Setting up curl (7.88.1-10+deb12u8) ...
Processing triggers for man-db (2.11.2-2) ...

root@linuxhelp:/# sudo install -m 0755 -d /etc/apt/keyrings

root@linuxhelp:/# sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc

root@linuxhelp:/# sudo chmod a+r /etc/apt/keyrings/docker.asc

root@linuxhelp:/# echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

root@linuxhelp:/# sudo apt-get update
Get:1 https://download.docker.com/linux/debian bookworm InRelease [43.3 kB]
Hit:2 http://deb.debian.org/debian bookworm InRelease                      
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://security.debian.org/debian-security bookworm-security InRelease
Get:5 https://download.docker.com/linux/debian bookworm/stable amd64 Packages [36.4 kB]
Fetched 79.8 kB in 2s (34.5 kB/s)  
Reading package lists... Done

Step 4: Install Docker Packages

root@linuxhelp:/# sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
docker-ce-rootless-extras git git-man iptables liberror-perl libip6tc2 libslirp0 patch pigz slirp4netns
Suggested packages:
cgroupfs-mount | cgroup-lite git-daemon-run | git-daemon-sysvinit git-doc git-email git-gui gitk gitweb git-cvs
git-mediawiki git-svn firewalld ed diffutils-doc
The following NEW packages will be installed:
containerd.io docker-buildx-plugin docker-ce docker-ce-cli docker-ce-rootless-extras docker-compose-plugin git git-man
iptables liberror-perl libip6tc2 libslirp0 patch pigz slirp4netns
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 130 MB of archives.
After this operation, 488 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up git (1:2.39.5-0+deb12u2) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for libc-bin (2.36-9+deb12u9) ...

Step 5: Verify the docker is Installed by running hello word image

root@linuxhelp:/# sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e6590344b1a5: Pull complete 
Digest: sha256:bfbb0cc14f13f9ed1ae86abc2b9f11181dc50d779807ed3a3c5e55a6936dbdd5
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

Step 6: Pull the httpd images

root@linuxhelp:/# docker pull httpd
Using default tag: latest
latest: Pulling from library/httpd
7cf63256a31a: Pull complete 
d2f10b557009: Pull complete 
4f4fb700ef54: Pull complete 
38fd0d422c41: Pull complete 
470035b3d48f: Pull complete 
fdebd6c6e1b2: Pull complete 
Digest: sha256:10381816bb7e60ae3a9db3784f2966a8910b6ff07c4da54bd2d62d2671c8ab6e
Status: Downloaded newer image for httpd:latest
docker.io/library/httpd:latest

step 7: Check the Docker Image

root@linuxhelp:/# docker images
REPOSITORY    TAG       IMAGE ID       CREATED       SIZE
httpd         latest    0de612e99135   6 weeks ago   148MB
hello-world   latest    74cc54e27dc4   6 weeks ago   10.1kB

Step 8: Run the Docker Image

root@linuxhelp:/# docker run -d --name apache -p 81:80 httpd
18a91ec33f6d0ebc6ad3c895cc52d367185028e49f9898644cd28ba278ed7971

Step 9: Browser system IP with Port number

snap1

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to configure Pluck CMS in Rocky Linux 9.5. Your feedback is much welcome.

Tags:
christian
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

What is the definition of “an image pull”?

A

An image pull includes both a version check and any images downloaded as a result of a pull request from either public or private repositories on Docker Hub.

Q

What is a container?

A

Containers are deployed applications bundled with all necessary dependencies and configuration files. All of the elements share the same OS kernel. Since the container isn’t tied to any one IT infrastructure, it can run on a different system or the cloud.

Q

Show how you would create a container from an image.

A

To create a container, you pull an image from the Docker repository and run it using the following command: $ docker run -it -d

Q

How about a command to stop the container?

A

Use the following command: $ sudo docker stop container name

Q

How do you check the versions of Docker Client and Server?

A

This command gives you all the information you need: $ docker version

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Jayce ?
What are the types of table used in IPtables

What are the various types of table used in IPtables and how to use that for my server security?

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.