Public Repository

Last pushed: a year ago
Short Description
Nginx image based off of phusion/baseimage
Full Description

An nginx image based off phusion/baseimage.

Example docker-compose syntax might look like the following:

nginx:
  image: capsol/nginx
  ports:
    - "80:80"
  volumes:
    - ./:/var/www
    - ./docker-config-files/nginx/sites-enabled/capsolyii2.dev:/etc/nginx/sites-enabled/capsolyii2.dev
    - ./docker-config-files/nginx/sites-enabled/admin.capsolyii2.dev:/etc/nginx/sites-enabled/admin.capsolyii2.dev
  links:
    - php

The DockerFile at this point contains the following:

FROM phusion/baseimage
MAINTAINER Jonathan Arnold jon@mixnblend.com

CMD ["/sbin/my_init"]

RUN apt-get update && apt-get install -y python-software-properties
RUN add-apt-repository ppa:nginx/stable
RUN apt-get update && apt-get install -y nginx

RUN echo "daemon off;" >> /etc/nginx/nginx.conf
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log

RUN mkdir -p /etc/service/nginx
ADD start.sh /etc/service/nginx/run
RUN chmod +x /etc/service/nginx/run

EXPOSE 80

RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN usermod -u 1000 www-data
RUN usermod -G staff www-data

start.sh contains:

#!/usr/bin/env bash
service nginx start
Docker Pull Command
Owner
capsol

Comments (0)