Docker 在 Debian 12 安装

发布时间:2025-06-24 18:02:14  作者:北方职教升学中心  阅读量:290


Docker Hub:https://hub.docker.com/。

安装 Docker 需要以下条件󿄚

已经安装的 Debian 12 系统 (VM 或硬件服务器)。

  • 相关 Docker 更多信息,请参阅以下页面:
  • Docker 官方文件:https://docs.docker.com/get-started/。

    下载 GPG 将密钥存储在系统中࿱中a;

    curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker.gpgecho "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker.gpg] https://download.docker.com/linux/debian bookworm stable" |tee /etc/apt/sources.list.d/docker.list > /dev/null apt update。易用的容器化解决方案,使开发人员和 DevOps 专业人士可以很容易地将应用程序从一个环境部署到另一个环境。

  • 更多信息。
  • 介绍。可靠、Docker 提供快速、

    可使用以下命令进行检查 Docker 系统启动时是否成功安装并自动启动:

    systemctl is-active docker。

  • 验证。

    安装 Docker 包:

    apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose。

    测试。hello-world。

    Docker镜像测试安装是否成功a;

    docker run hello-world。

    如果一切正常󿀌您将看到类似于以下输出:

    Unable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-world478afc900: Pull completeDigest: sha256:03b30c6a320ff172b52bd68edfdededed08ce47e65fe52de861c5e9df46dstatus: Downloaded newer image for hello-world:latestHello 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. (arm64v8) 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 bashShare 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/。

    debian12 安装 docker

    Docker 在 Debian 12 安装。

    • 更多信息。

      验证。

      安装 Docker 包:

      apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-compose。
      在现代发展环境中,容器技术起着至关重要的作用。

      更多信息。

    • 测试。

      • 安装。下一部分,我会详细介绍的 Docker 安装步骤和基本功能。 也可以通过启动。

        • root 权限
        • 以下命令可用于安装 Docker:

        sudo su &&apt update &&apt install ca-certificates curl gnupg apt-transport-https gpg。 Docker 安装过程在 Debian 12 非常简单的系统,只需几个命令即可完成。