Dockerfile 安装nginx错误

伟洪winni 2018-04-13 05:54:13

FROM hub.c.163.com/netease_comb/centos:7

RUN yum install -y epel-release && yum update -y && yum install -y gcc pcre pcre-devel zlib zlib-deve

ADD nginx-1.12.2.tar.gz /tmp/

WORKDIR /tmp/nginx-1.12.2

RUN ./configure --prefix=/usr/local/nginx --with-http_stub_status_module --with-pcre --without-http_gzip_module && make && make install

RUN ln -s /usr/local/nginx/sbin/nginx /usr/bin/

COPY nginx.conf /usr/local/nginx/conf/
COPY vhosts.conf /usr/local/nginx/conf/

EXPOSE 80 443

ENTRYPOINT ["nginx"]

CMD ["-h"]



[root@VM_0_17_centos docker]# docker build -t docker .


...全文
1348 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
伟洪winni 2018-06-06
  • 打赏
  • 举报
回复
伟洪winni 2018-05-25
  • 打赏
  • 举报
回复
少了make, 之前一直弄成cmake了
李庆海 2018-05-03
  • 打赏
  • 举报
回复
你好,在错误处标红行很显然是找不到make命令,(/bin/sh: make ,command not fund)。请安装gcc,gcc-c++,make等编译需要的库
伟洪winni 2018-05-03
  • 打赏
  • 举报
回复

18,772

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧