dockerfile实例--安装nginx
2016-08-31 14:02
645 查看
[root@localhost ~]# vi Dockerfile //ADD FROM centos_with_net MAINTAINER frankie onez0714@163.com RUN yum install -y pcre-devel wget net-tools gcc zlib zlib-devel make openssl-devel ADD http://nginx.org/download/nginx-1.8.0.tar.gz RUN tar zxvf nginx-1.8.0.tar.gz . RUN mkdir -p /usr/local/nginx RUN cd nginx-1.8.0 && ./configure --prefix=/usr/local/nginx && make && make install RUN rm -vf /usr/local/nginx/conf/nginx.conf COPY .nginx_conf /usr/local/nginx/conf/nginx.conf EXPOSE 80 [root@localhost ~]# docker build -t centos_nginx . Sending build context to Docker daemon 630.8MB Sending build context to Docker daemon Step 0 : FROM Centos .... .... Successfully built 8bca20d1b64b [root@localhost ~]# docker run -itd -P centos_nginx bash [root@localhost ~]# docker exec -it 0387 bash [root@0387 /]# ls /usr/local/nginx conf html logs sbin
相关文章推荐
- Docker中Dockerfile的格式、Dockerfile安装nginx实例
- 安装Nginx的Dockerfile实例
- 手把手教你写Dockerfile, 附赠MongoDB和Nginx Dockerfile编写实例
- 手把手教你写Dockerfile, 附赠MongoDB和Nginx Dockerfile编写实例
- 手把手教你写Dockerfile, 附赠MongoDB和Nginx Dockerfile编写实例
- docker 安装 创建支持ssh服务的镜像 创建nginx服务的镜像 用dockerfile制作nginx镜像
- dockerfile 安装 nginx
- docker--学习笔记最后附dockerfile--nginx实例
- dockerfile 安装nginx
- 【系列3】使用Dockerfile创建带编译安装nginx服务的Centos Docker镜像
- Dockerfile构建Nginx实例
- Ubuntu 17.04 x64 安装 Docker CE 初窥 Dockerfile 部署 Nginx
- dockerfile 创建docker容器实例nginx
- Ubuntu 17.04 x64 安装 Docker CE 初窥 Dockerfile 部署 Nginx
- 【系列3】使用Dockerfile创建yum安装nginx服务的Centos Docker镜像
- 手把手教你写Dockerfile, 附赠MongoDB和Nginx Dockerfile编写实例
- 6 dockerfile 安装nginx
- 2.8-dockerfile示例-安装nginx
- Docker安装nginx
- Dockerfile命令介绍及实例