####################################### #Dockerfile to build a ganetimgr image# # Uses Deban packages instead of pip # ####################################### # We use wheezy as a base (for now) FROM debian:wheezy MAINTAINER GRNET_NOC ENV GANETIMGR_UPSTREAM_URL https://github.com/grnet/ganetimgr.git # First layer - only system packages, nothing from the stack RUN apt-get update -q2 && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -q2 git procps apt-utils # Django and rest of python dependencies for the project RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -q2 python-django python-django-south python-django-registration python-paramiko python-simplejson python-daemon python-setproctitle python-pycurl python-recaptcha python-ipaddr python-bs4 python-requests python-markdown python-gevent # Daemon dependencies RUN DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -q2 gunicorn beanstalkd nginx redis-server # Create a placeholder dir for the repo and switch context inside it ENV GANETIMGR_INSTALLDIR=/srv/ganetimgr RUN mkdir -p $GANETIMGR_INSTALLDIR WORKDIR $GANETIMGR_INSTALLDIR # Predifined Settings for use inside the container COPY settings.py $GANETIMGR_INSTALLDIR/ganetimgr/settings.py # Helper function to get the db connection info from envvars COPY dj_database_url.py $GANETIMGR_INSTALLDIR/ganetimgr/dj_database_url.py # Fixture to autoadd the cluster from the ganeti container (hardcoded for now) COPY cluster_insert.json $GANETIMGR_INSTALLDIR/cluster_insert.json COPY ganetimgr.nginx.conf /etc/nginx/nginx.conf # nginx run inside the container EXPOSE 80 COPY entrypoint.sh / # Set this as a CMD instead of ENTRYPOINT in order to be able to override it CMD ["/entrypoint.sh"]