docker拉取nginx镜像失败(m4/arm64架构)

执行docker pull nginx:latest的报错信息

Error response from daemon: failed to resolve reference "docker.io/library/nginx:latest": failed to do request: Head "https://docker.mirrors.ustc.edu.cn/v2/library/nginx/manifests/latest?ns=docker.io": dialing docker.mirrors.ustc.edu.cn:443 container via direct connection because Docker Desktop has no HTTPS proxy: connecting to docker.mirrors.ustc.edu.cn:443: dial tcp: lookup docker.mirrors.ustc.edu.cn: no such host

解决方法:

  1. 执行以下指令拉取镜像

    docker pull registry.cn-shenzhen.aliyuncs.com/amgs/nginx:latest

  2. 运行容器

    docker run -d -p 8080:80 --name my-nginx registry.cn-shenzhen.aliyuncs.com/amgs/nginx:latest

    复制代码
    -d:让容器在后台运行。
    -p:Publish a container's port(s) to the host。-p 8080:80将主机的 8080 端口映射到容器的 80 端口
    --name:Assign a name to the container。--name my-nginx将容器命名为 my-nginx
    registry.cn-shenzhen.aliyuncs.com/amgs/nginx:latest:要运行的镜像名称
  3. 访问http://localhost:8080 可以看到nginx的欢迎界面

相关推荐
leeyi1 天前
把软件装进不能上网的机房——一套建好了、还没上过战场的交付工程(第101篇)
docker·aigc·agent
YIAN1 天前
Docker + Nginx 核心原理扫盲:从环境隔离到反向代理,运维面试必考点
后端·docker·面试
IT大白鼠1 天前
Docker 实战 ELKF 日志监控:容器日志全栈收集分析方案
运维·docker·容器
小张同学a.2 天前
Docker 容器实战 1—— docker 基础与镜像构建
linux·运维·docker·容器
NJCloud2 天前
Docker 容器技术入门:部署、核心概念与基础命令
运维·docker·容器
2601_962072332 天前
docker自建rustdesk-server远程桌面
运维·docker·容器
pnoker2 天前
从零部署 IoT DC3:四步快速启动实录
物联网·docker·部署
虎王物联2 天前
RK3568嵌入式Linux跑Docker:内核配置排查到AIoT容器化的完整路径
linux·运维·docker·rk3568·aiot·嵌入式linux
缘友一世2 天前
GLM-5.3-NVFP4 部署实战系列[二]Docker 镜像选择与补丁镜像构建:纯 Python overlay,不重编一行 CUDA
python·docker·容器·vllm
数字化小张2 天前
Docker镜像优化——从1GB到100MB的瘦身实践
docker