ubuntu 18.04 安装docker
发表于:2025-12-02 作者:千家信息网编辑
千家信息网最后更新 2025年12月02日,修改apt源# sudo vim /etc/apt/sources.listdeb http://mirrors.aliyun.com/ubuntu/ bionic main restricted u
千家信息网最后更新 2025年12月02日ubuntu 18.04 安装docker
修改apt源
# sudo vim /etc/apt/sources.listdeb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiversedeb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse# sudo apt-get update# sudo apt-get upgrade
安装依赖库
# sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
添加Docker官方GPG key
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
设置Docker稳定版仓库
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
更新apt源索引
# sudo apt-get update
安装最新版Docker CE(社区版)
# sudo apt-get install -y docker-ce
检查Docker CE是否安装正确,出现 Hello from Docker! ,则表示安装成功
# sudo docker run hello-worldUnable to find image 'hello-world:latest' locallylatest: Pulling from library/hello-world1b930d010525: Pull complete Digest: sha256:4df8ca8a7e309c256d60d7971ea14c27672fc0d10c5f303856d7bc48f8cc17ffStatus: 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. (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 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/
安装docker-compose
$ sudo curl -L https://github.com/docker/compose/releases/download/1.25.0-rc4/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose$ sudo chmod +x /usr/local/bin/docker-compose$ docker-compose version
设置权限,不用每次都输入sudo
$ sudo usermod -a -G docker docker
docker常用命令
# # 启动docker# sudo service docker start# # 停止docker# sudo service docker stop# # 重启docker# sudo service docker restart
成功
不用
仓库
命令
官方
常用
最新版
权限
社区
索引
更新
检查
输入
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
微信服务器出现波动
上海维亿网络技术
数据库系统王能斌课后答案
洛阳云腾智慧互联网科技
小学生网络安全教育培训
服务器总是
无锡网络技术咨询商家
软件开发是否违法
珠海地产软件开发
快云服务器免费申请
郑州专科学校学软件开发
网络安全保卫支队负面新闻
软件开发英文单词txt
网络安全风险管理的基本要素
佛山数字软件开发批发价
学编程还是网络安全
数据库怎么访问云盘
超市数据库功能流程图
宏病毒的网络安全
软件开发简历如何写
江苏数据软件开发设施参考价格
中国知网中国引文数据库哪找
万方信息数据库官网
倩女手游服务器名字
辽宁2020 网络安全和信息化
深圳服务器设备供应商哪家正规
自考软件开发专业有哪些
手机怎么会提示验证短信服务器
什么是车联网网络技术
苹果id服务器崩了