Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
cehbrecht committed Sep 23, 2015
1 parent f379bb6 commit a74d873
Showing 1 changed file with 27 additions and 24 deletions.
51 changes: 27 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
FROM ubuntu:14.04
MAINTAINER Hummingbird WPS Application
FROM birdhouse/bird-base:latest
MAINTAINER https://github.com/bird-house

LABEL Description="Hummingbird WPS Application" Vendor="Birdhouse" Version="0.2.2"

# Add user phoenix
RUN useradd -d /home/phoenix -m phoenix

# Add bootstrap and application requirements
ADD ./bootstrap.sh /tmp/bootstrap.sh
ADD ./requirements.sh /tmp/requirements.sh
# Set current home
ENV HOME /root

WORKDIR /tmp
# Add application sources
ADD . /opt/birdhouse

# cd into application
WORKDIR /opt/birdhouse

# Install system dependencies
RUN bash bootstrap.sh -i && bash requirements.sh

# Add application sources
ADD . /home/phoenix/src

# Change permissions for user phoenix
RUN chown -R phoenix /home/phoenix/src
# Set conda enviroment
ENV ANACONDA_HOME /opt/conda
ENV CONDA_ENVS_DIR /opt/conda/envs

# cd into application
WORKDIR /home/phoenix/src
# Run install
RUN make clean install

# Remaining tasks run as user phoenix
USER phoenix
# Volume for data, cache, logfiles, ...
RUN chown -R www-data $CONDA_ENVS_DIR/birdhouse
RUN mv $CONDA_ENVS_DIR/birdhouse/var /data && ln -s /data $CONDA_ENVS_DIR/birdhouse/var
VOLUME /data

# Update makefile and run install
RUN bash bootstrap.sh -u && make clean install
# Configure hostname and user for services
ENV HOSTNAME localhost

# cd into conda birdhouse environment
WORKDIR /home/phoenix/.conda/envs/birdhouse
# Ports used in birdhouse
EXPOSE 8090 9001 8094 28094

# all currently used ports in birdhouse
EXPOSE 8080 8081 8082 8090 8091 8092 8093 8094 9001 9002
# Start supervisor in foreground
ENV DAEMON_OPTS --nodaemon --user www-data

CMD ["bin/supervisord", "-n", "-c", "etc/supervisor/supervisord.conf"]
# Update config and start supervisor ...
CMD ["make", "update-config", "start"]

0 comments on commit a74d873

Please sign in to comment.