Docker安装篇(CentOS7.6)

dandan3年前程序开发2366

7.6环境自带gcc和gcc-c++,不用再装


安装yum-utils

yum install -y yum-utils


设置阿里云镜像仓库

yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo


建立缓存(centOS8的话去掉fast)

yum makecache fast


安装

yum -y install docker-ce docker-ce-cli container.io


运行

systemctl start docker


查看进程

ps -ef| grep docker


在阿里云,容器镜像服务->镜像工具->获取加速器地址后,然后按他提供的设置命令执行即可,分4次执行

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["阿里云上的地址"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

然后可以测试hello world

docker run hello-world

设置开机启动

systemctl enable docker


返回列表

上一篇:git操作

下一篇:Docker使用篇

相关文章

go Imagick图片处理

使用前先需要安装ImageMagicMac环境brew install imagemagick #安装依赖(不确定装完上面会不会自动装) #尝试的时候发现依赖都装不上,把提示的...

camunda使用

1、 拉取镜像docker pull camunda/camunda-bpm-platform:7.17.02、配置并启动docker run -d ...

linux安装go环境

1、在 https://go.dev/dl/  下载linux的包2、上传到服务器,解压,比如放到/opt后,执行下命令,解压到当前目录得到go文件夹tar -xzf&n...

k8s学习

k3s学习环境安装,准备3台虚拟机,centos7.6以上操作每台机子都要执行,操作完成后,修改主机名hostnamectl set-hostname k8s-master...

opemim安装部署

前置准备:(1)安装golang环境(官网下linux包到服务器解压,设置环境变量到bin目录即可),并设置go代理:go env -w GOPROXY=https://proxy.golang.co...

使用ngrok进行内网穿透

1、在官网注册账号:https://ngrok.com/ 2、左侧导航Setup & Installtion,下载当前电脑的应用3、左侧导航Your Authtoken,获取token配置命令...

发表评论    

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。