从零开始学docker(五)-可用的docker镜像

最近docker镜像都不能访问,目前亲测可用的docker镜像可用,并拉取mysql测试完成。

缺点\] docker search 查不到镜像的索引列表,只能手动查询索引目录(解决方案在最后)。

linux服务器vim打开镜像文件daemon.json

java 复制代码
 vim /etc/docker/daemon.json 

添加以下镜像

shell 复制代码
 {
  "registry-mirrors": [
    "https://docker.1panelproxy.com",
    "https://2m11665s.mirror.aliyuncs.com",
    "https://registry.docker-cn.com",
    "https://dockerhub.azk8s.cn",
    "https://docker.mirrors.ustc.edu.cn",
    "http://hub-mirror.c.163.com",
    "https://k8s.gcr.io",
    "https://github-releases.githubusercontent.com",
    "https://vsxcs7sq.mirror.aliyuncs.com",
    "https://ustc-edu-cn.mirror.aliyuncs.com"
   ]
}

重新加载镜像文件

shell 复制代码
 systemctl daemon-reload

重启docker容器

java 复制代码
 systemctl restart docker

测试拉取mysql镜像

java 复制代码
[root@192 ~]# docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
2c0a233485c3: Pull complete 
cb5a6a8519b2: Pull complete 
570d30cf82c5: Pull complete 
a841bff36f3c: Pull complete 
80ba30c57782: Pull complete 
5e49e1f26961: Pull complete 
ced670fc7f1c: Pull complete 
0b9dc7ad7f03: Pull complete 
cd0d5df9937b: Pull complete 
1f87d67b89c6: Pull complete 
Digest: sha256:0255b469f0135a0236d672d60e3154ae2f4538b146744966d96440318cc822c6
java 复制代码
[root@192 ~]# docker image ls
REPOSITORY   TAG       IMAGE ID       CREATED        SIZE
mysql        latest    56a8c14e1404   2 months ago   603MB

查询仓库索引的方法

以前使用docker search命令进行镜像查询,目前此命令查询会报以下错误

解决方案,在docker search 后添加: register.liberx.info/镜像名称

java 复制代码
docker search register.liberx.info/mysql

查询Description的详情

java 复制代码
docker search register.liberx.info/portainer --no-trunc --limit 5

格式化查询

java 复制代码
 docker search register.liberx.info/portainer --no-trunc --limit 5 --format "{{.Name}}: {{.Description}}"

运行docker的图形化界面portainer-ce

java 复制代码
docker run -d -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

启动页面访问linuxip:9000

tips: 第一次访问需要创建密码

相关推荐
序属秋秋秋25 分钟前
《Linux系统编程之系统导论》【冯诺依曼体系结构 + 操作系统基本概述】
linux·运维·服务器·c语言·ubuntu·操作系统·冯诺依曼体系结构
roman_日积跬步-终至千里1 小时前
【Docker多节点部署】基于“配置即身份“理念的 Docker 多节点 StarRocks 高可用集群自动化部署方案
java·docker·微服务
piepis1 小时前
Doris Docker 完整部署指南
数据仓库·docker·doris·容器部署
LSL666_3 小时前
5 Repository 层接口
android·运维·elasticsearch·jenkins·repository
sg_knight6 小时前
Docker 实战:如何限制容器的内存使用大小
java·spring boot·spring·spring cloud·docker·容器·eureka
电棍2336 小时前
在docker a100云服务器运行vulkan->sapien->robotwin的经验(报错segmentation fault)
运维·docker·容器
云动雨颤7 小时前
访问宝塔面板安全入口404?SSH命令轻松解决
linux·运维·安全
NPE~8 小时前
[Linux命令分享]日志查看 — — less
linux·运维·less·常用命令·日志查看
大锦终9 小时前
【Linux】网络层与数据链路层中重点介绍
linux·运维·服务器·网络
lht63193561210 小时前
从Windows通过XRDP远程访问和控制银河麒麟 v10服务器
linux·运维·服务器·windows