github.com/blystad/deis@v0.11.0/controller/Dockerfile (about)

     1  FROM deis/base:latest
     2  MAINTAINER OpDemand <info@opdemand.com>
     3  
     4  # install required system packages
     5  # HACK: install git so we can install bacongobbler's fork of django-fsm
     6  # install openssh-client for temporary fleetctl wrapper
     7  RUN apt-get update && \
     8      apt-get install -yq python-dev libpq-dev libyaml-dev git openssh-client
     9  
    10  # install recent pip
    11  RUN wget -qO- https://raw.githubusercontent.com/pypa/pip/1.5.5/contrib/get-pip.py | python -
    12  
    13  # add a deis user that has passwordless sudo (for now)
    14  RUN useradd deis --groups sudo --home-dir /app --shell /bin/bash
    15  RUN sed -i -e 's/%sudo\tALL=(ALL:ALL) ALL/%sudo\tALL=(ALL:ALL) NOPASSWD:ALL/' /etc/sudoers
    16  
    17  # create a /app directory for storing application data
    18  RUN mkdir -p /app && chown -R deis:deis /app
    19  
    20  # create directory for confd templates
    21  RUN mkdir -p /templates && chown -R deis:deis /templates
    22  
    23  # create directory for logs
    24  RUN mkdir -p /var/log/deis && chown -R deis:deis /var/log/deis
    25  
    26  # define execution environment
    27  CMD ["/app/bin/boot"]
    28  EXPOSE 8000
    29  
    30  # define work environment
    31  WORKDIR /app
    32  
    33  # install dependencies
    34  ADD requirements.txt /app/requirements.txt
    35  RUN pip install -r /app/requirements.txt
    36  
    37  ADD . /app
    38  
    39  # Create static resources
    40  RUN /app/manage.py collectstatic --settings=deis.settings --noinput