首页 > 其他分享 >Docker安装

Docker安装

时间:2022-12-02 19:37:16浏览次数:64  
标签:sudo apt etc version Docker 安装 docker

官方参考文档:Install Docker Engine on Debian

设置存储库

  1. 下载所需工具:
sudo apt update && sudo apt install ca-certificates curl gnupg lsb-release -y
  1. 添加 Docker 的官方 GPG 密钥
sudo mkdir -p /etc/apt/keyrings && cd /etc/apt/keyrings
  1. 添加Docker存储库
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  1. 设置Docker密钥权限
sudo chmod a+r /etc/apt/keyrings/docker.gpg

安装 Docker 引擎

  1. 更新Docker软件包索引
sudo apt-get update
  1. 安装Docker最新软件包
sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
  1. Docker验证
sudo docker info		#查看Docker详细信息
sudo docker compose version	#查看Docker commpose版本

#输出信息
#sudo docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.9.1-docker)
  compose: Docker Compose (Docker Inc., v2.12.2)
  scan: Docker Scan (Docker Inc., v0.21.0)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 20.10.21
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 770bd0108c32f3fb5c73ae1264f7e503fe7b2661
 runc version: v1.1.4-0-g5fd4c4d
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.0-19-amd64
 Operating System: Debian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 1.904GiB
 Name: debian
 ID: WWW2:NYGC:EX4I:L4C2:KOYC:D4DW:37Q7:3PYZ:YN63:SSDH:2QAK:747Q
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

#sudo docker compose version
Docker Compose version v2.12.2

标签:sudo,apt,etc,version,Docker,安装,docker
From: https://www.cnblogs.com/c0ldzera/p/16945418.html

相关文章

  • Mac Homebrew 安装
    1、Makesureyou'veinstalledBrew,withthis(waituntilitsdoneinstalling)(Edit:addedendingquotetotheend)/bin/bash-c"$(curl-fsSLhttps://raw.git......
  • CentOS Linux 的安装
    CentOSLinux的安装作者:Grey原文地址:博客园:CentOSLinux的安装CSDN:CentOSLinux的安装说明本安装说明是基于Windows10下VMwareworkstation16安装Linux,Li......
  • docker常用
    docker镜像网址https://hub.docker.com/search?q=&type=imagehttps://hub.docker.com/后续......
  • Windows Live Messenger 2011,离线安装、多开、去广告……
    WindowsLiveMessenger2011,离线安装、多开、去广告……WindowsLiveEssentials2011发布之后,我就马上喜欢上了其中的​​WindowsLiveMesh​​​和​​WindowsLiveWri......
  • mac安装nginx
    homebrew安装Nginx推荐Mac电脑上内置homebrew工具安装。安装Nginx:brewinstallnginx卸载Nginx:brewuninstallnginxHomebrewHomebrew是一款MacOS平台下的......
  • Linux安装宝塔,OCI8,连接ORACLE数据库
    https://www.cnblogs.com/YALSI/p/16677974.html基础环境centos7安装BT宝塔网址:https://www.bt.cn/download/linux.html安装ORACLE客户端下载地址: https://www.o......
  • Docker 安装 nexus 私服
    1.下载nexus3镜像dockerpullsonatype/nexus32.新建挂载目录这里将nexus的目录挂载到宿主机的​​/usr/soft/nexus-data​​文件夹下,并修改文件夹权限mkdir-p/usr/......
  • Docker Swarm 内部服务发现和负载均衡原理
    1.集群环境准备搭建三台服务器,并安装docker环境,并保证能正常连接互联网,后面会使用其他镜像做负载均衡测试。192.168.104.79192.168.104.80192.168.104.81首先修改hostname......
  • Docker 使用PXC搭建MySQL集群(MySQL:5.7.24)
    关于MySQL集群,常用的有两种模式:​​Replication集群架构(主从复制)​​​和​​PXC集群架构​​PXC集群方案所有节点都是可读可写的,Replication从节点不能写入,因为主从同步......
  • 【FastDfs】Docker自定义构建ARM架构的FastDfs镜像
    由于服务器环境为ARM架构,在部署fastdfs时,发现网上的镜像几乎都是X86_64的,不同架构的镜像还不能通用,这个就有点烦了。。。。。由于之前没有从头编译制作过镜像,步步都是坑,在......