首页 > 其他分享 >Docker安装笔记

Docker安装笔记

时间:2022-10-17 10:57:41浏览次数:36  
标签:笔记 hello yum world Docker 安装 docker latest

Docker安装笔记

1.卸载旧版本

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2.安装依赖设置yum仓库

安装依赖:

yum install -y yum-utils \
  device-mapper-persistent-data \
  lvm2

3.设置仓库:

yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo
  1. 安装docker

yum install docker-ce docker-ce-cli containerd.io
  1. 启动并加入开机启动

systemctl start docker
systemctl enable docker

6.验证是否安装成功

docker version
docker run hello-world
[root@localhost etc]# sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete 
Digest: sha256:cc15c5b292d8525effc0f89cb299f1804f3a725c8d05e158653a563f15e4f685
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/

7.卸载 docker

删除安装包:

yum remove docker-ce

删除镜像、容器、配置文件等内容:

rm -rf /var/lib/docker

标签:笔记,hello,yum,world,Docker,安装,docker,latest
From: https://www.cnblogs.com/Horsonce/p/16798391.html

相关文章

  • Google已将”XXX”标记为恶意扩展程序并已阻止系统安装它
    在Chrome浏览器中安装扩展程序时报错;Google已将”XXX”标记为恶意扩展程序并已阻止系统安装它 解决方法:1)将下载的扩展插件文件 *.crx,文件名crx后缀改为zip2)并用RA......
  • Xshell安装
    xshell破解版链接:https://pan.baidu.com/s/15A6gimNYPiSzROBjNBzImw提取码:xxk8 软件介绍Xshell6是由国外NetSarang公司开发的一款功能强大、并且非常出色......
  • 树莓派docker安装homeassistant container
    树莓派docker安装homeassistantcontainer1.docker1.1.docker安装#更新一下软件sudoaptupdate-ysudoaptupgrade-y#下载Docker安装脚本sudocurl-fsSLhtt......
  • skyler实战渗透笔记(十一)—Kioptrix-1
    skyler实战渗透笔记:笔记是为了记录实战渗透学习过程,分享渗透过程思路与方法。请注意:对于所有笔记中复现的终端或服务器,都是自行搭建环境或已获授权渗透的。使用的技术仅......
  • python安装与python、pip的环境变量配置
    进入官网在你常用的搜索引擎中输入python官网然后进入。可直接点击本链接python官网进入;也可在浏览器地址栏输入www.python.org回车进入官网。下载将鼠标放到菜......
  • Docker | 自定义网络(网关、子网地址)
    了解dockernetwork通过下面的命令来获取帮助dockernetwork--helpCommands:connectConnectacontainertoanetworkcreateCreateanetwork......
  • docker安装tomcat、mysql、redis
    一、tomcat1.下载tomcat8dockerpulltomcat:8.5.612.启动容器(-d后台启动)dockerrun-d-p8080:8080tomcat:8.5.61 3.访问首页http://ip:8080/访问不到......
  • 计算机视觉笔记
    计算机视觉笔记:内容包含深度学习、图像处理、图像特征、图像分类、目标检测、图像分割等基础知识。Tensorflow:深度学习开源框架,封装了大量深度学习函数。tensorflow系统......
  • mysql安装教程-window操作系统
    1、下载安装包(官网下载)直达链接:https://dev.mysql.com/downloads/mysql/       下载后放到指定目录下解压即可(给电脑新手忠告:注意不要放在C盘,养成好习惯......
  • Kruskal重构树 学习笔记
    我们回顾一下最小与最大生成树的性质:对于一张图的最小生成树,原图中任意两个节点中任意一条路径的边权最大值的最小值为生成树中节点路径间边权的最大值。最大生成树则相反......