openresty之docker 镜像
2017-07-18 00:34
148 查看
基础镜像是按照上编博客-openResty入门-安装编 创建的以ubuntu 为原始镜像,执行 docker run -it ubuntu sh 之后执行一步一步安装,最后 docker commit 保存出来的镜像为基础镜像
nginx.conf的内容
执行docker build
docker build -t
reg.enncloud.cn/qinzhao-harbor/ubuntu-openresty:v1.0.14 -f Dockerfile
访问localhost:9900
➜ openresty git:(master) cat Dockerfile FROM harbor.enncloud.cn/qinzhao-harbor/ubuntu-openresty:v1.0.0 ENV PATH /usr/local/openresty/nginx/sbin:$PATH ADD nginx.conf /work/conf/ WORKDIR /work/ EXPOSE 8080 CMD /usr/local/openresty/nginx/sbin/nginx -g 'daemon off;' -c /work/conf/nginx.conf
nginx.conf的内容
➜ openresty git:(master) cat nginx.conf worker_processes 1; error_log logs/error.log; events { worker_connections 1024; } http { server { listen 8080; location / { default_type text/html; content_by_lua ' ngx.say("<p>hello, world</p>") '; } } }
执行docker build
docker build -t
reg.enncloud.cn/qinzhao-harbor/ubuntu-openresty:v1.0.14 -f Dockerfile
➜ openresty git:(master) sudo docker ps Password: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 81aa43d8ec48 reg.enncloud.cn/qinzhao-harbor/ubuntu-openresty:v1.0.14 "/bin/sh -c '/usr/..." 10 hours ago Up About an hour 0.0.0.0:9900->8080/tcp eager_euclid
访问localhost:9900
相关文章推荐
- Docker下的OpenResty三部曲之三:OpenResty加Tomcat的服务
- 基于 orange(nginx+openresty) + docker 实现微服务 网关功能
- Alpine Linux,一个只有5M的Docker镜像
- linux中安装openresty+sqlite开发环境
- Docker镜像容器操作常用命令
- 克服跨洋网络延迟,使用Docker Hub Mirror加速Docker官方镜像下载
- Dockerfile生成镜像并实现应用自启
- docker 四.使用docker镜像.
- Docker学习实践 (4)-- 创建镜像
- docker启动镜像出错
- Docker学习记录(4)——docker pull默认从本地镜像仓库拉取镜像
- docker 一个镜像 所有容器的 dockerfile 搭建
- Docker镜像加速
- 将 ASP.NET Core 1.0 应用作为 docker 镜像发布 (Linux版)
- docker 创建基础镜像
- 基于Ubuntu 14.04构建mysql5.6 Docker镜像
- Docker 学习制作第一个镜像
- docker 列出镜像命令
- docker三大组件---镜像
- docker三大组件---镜像