dockernginxpassengerphusion

Phusion Baseimage vs. Phusion Passenger (Can I install NGINX easily on baseimage?)


Building a Phusion+NGINX+Gunicorn+Django web stack inside docker container, doccumenting on github. I have the container running with django and gunicorn. I would like to set up an NGINX reverse proxy. Originally, my plan was just to add something like this(assuming that my bseimage is derived from 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

Where the file debrepos.txt has the following:

#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

From there I would replace the nginx.conf file with the one I need. Recently, I found out about passenger. So my real questions are a.)will the above work in phusion-baseimage? and b.)should I just start over and do this using passenger and docker_compose.yml?

P.S. Let me know if I should include the full dockerfile from my repo. I left it out in the name of minimization.


Solution

  • Passenger author here. We have a passenger-docker baseimage which is based on baseimage-docker: https://github.com/phusion/passenger-docker It already contains Nginx.