Dockerfile构建镜像问题?
# cat Dockerfile#Version:1.0
FROM centos
MAINTAINER FXFXFX "29702@qq.com"
RUN yum -y install nginx
RUN echo 'Hi,I am in your container' >/usr/share/nginx/html/index.html
EXPOSE 80
# docker build -t="fxfx01/static_web" .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM centos
---> 980e0e4c79ec
Step 2 : MAINTAINER FXFXFX "297@qq.com"
---> Using cache
---> 1d5697f62ca9
Step 3 : RUN yum -y install nginx
---> Running in 091899bce051
Loaded plugins: fastestmirror, ovl
Determining fastest mirrors
* base: mirrors.aliyun.com
* extras: centos.ustc.edu.cn
* updates: mirrors.neusoft.edu.cn
No package nginx available.
Error: Nothing to do
The command '/bin/sh -c yum -y install nginx' returned a non-zero code: 1
安装nginx报错。
宿主机也是centos,但是手工执行yum -y install nginx 能安装。
这是什么原因呀?
@afiua
支持
页:
[1]