【发布时间】:2017-09-05 14:52:26
【问题描述】:
在 docker 容器内构建 Phusion+NGINX+Gunicorn+Django 网络堆栈,记录 on github。我有使用 django 和 gunicorn 运行的容器。我想设置一个 NGINX 反向代理。最初,我的计划只是添加这样的东西(假设我的 bseimage 是从 trusty 派生的):
#cat NGINX repos to sources.list
RUN cat ../../etc/apt/sources.list >> debrepos.txt
#install nginx
RUN apt-get update
RUN apt-get install nginx
文件debrepos.txt 有以下内容:
#stanzas for nginx
deb http://nginx.org/packages/ubuntu/ trusty nginx
#deb http://nginx.org/packages/ubuntu/ trusty nginx
deb-src http://nginx.org/packages/ubuntu/ trusty nginx
#deb-src http://nginx.org/packages/ubuntu/ trusty nginx
从那里我会用我需要的文件替换nginx.conf 文件。最近,我发现了乘客。所以我真正的问题是a。)上述工作是否适用于phusion-baseimage?和 b.)我应该重新开始并使用乘客和 docker_compose.yml 来执行此操作吗?
附:让我知道我是否应该从我的仓库中包含完整的 dockerfile。我以最小化的名义省略了它。
【问题讨论】:
标签: docker nginx passenger phusion