Docker安装篇(CentOS7.6)

dandan4年前程序开发3269

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使用篇

相关文章

camunda使用

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

使用ngrok进行内网穿透

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

mysql5.6导入mysql8的坑

1、虽然在mysql8里设置数据库的排序规则是utf8mb4_general_ci ,但是导入后,却都被变成了utf8mb4_0900_ai_ci解决:用navicae导出的,表语句中没有COLLAT...

宝塔nginx配置允许各种文件的下载

location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|pdf|doc|docx|xls|xlsx|rar|zip|gz|7z|ppt|pptx|mp3|...

通过frp进行内网穿透

因为ngrok会定义刷新域名,有点限制,如果没有服务器域名,用他合适,如果有自己的服务器、域名,则用frp:按照https://blog.csdn.net/mirage003/article/deta...

mac m1 中go使用kafka

当前docker-comose:version: '3' services:   Etcd:     con...

发表评论    

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