99网
您的当前位置:首页Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist: No URLs

Error: Failed to download metadata for repo ‘appstream‘: Cannot prepare internal mirrorlist: No URLs

来源:99网

编写自己的dockerfile文件

FROM centos
MAINTAINER codeyuaiiao<haijiao_yu@163.com>
ENV MYPATH /usr/local
WORKDIR $MYPATH
RUN yum -y install vim
RUN yum -y install net-tools
EXPOSE 80
CMD echo $MYPATH
CMD echo "----------end-----------"
CMD /bin/bash

执行命令

docker build -f dockerfile -t mycentos:0.1 .

编写后生成镜像报错

原因

解决

替换为版本7
FROM centos
替换为 FROM centos:7

因篇幅问题不能全部显示,请点此查看更多更全内容