This repository has been archived on 2020-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
quay/Dockerfile

64 lines
1.9 KiB
Text
Raw Normal View History

# vim:ft=dockerfile
2015-01-29 16:03:23 +00:00
FROM phusion/baseimage:0.9.16
ENV DEBIAN_FRONTEND noninteractive
ENV HOME /root
# Install the dependencies.
2015-06-24 18:00:58 +00:00
RUN apt-get update # 24JUN2015
# New ubuntu packages should be added as their own apt-get install lines below the existing install commands
2015-02-05 22:15:17 +00:00
RUN apt-get install -y git python-virtualenv python-dev libjpeg8 libjpeg62 libjpeg62-dev libevent-2.0.5 libevent-dev gdebi-core g++ libmagic1 phantomjs nodejs npm libldap-2.4-2 libldap2-dev libsasl2-modules libsasl2-dev libpq5 libpq-dev libfreetype6-dev libffi-dev libgpgme11 libgpgme11-dev
# Build the python dependencies
ADD requirements.txt requirements.txt
RUN virtualenv --distribute venv
RUN venv/bin/pip install -r requirements.txt
# Install the binary dependencies
ADD binary_dependencies binary_dependencies
RUN gdebi --n binary_dependencies/*.deb
# Install Grunt
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN npm install -g grunt-cli
# Install Grunt depenencies
ADD grunt grunt
RUN cd grunt && npm install
2015-02-05 22:15:17 +00:00
RUN apt-get remove -y --auto-remove python-dev g++ libjpeg62-dev libevent-dev libldap2-dev libsasl2-dev libpq-dev libffi-dev libgpgme11-dev
2015-01-29 16:03:23 +00:00
RUN apt-get autoremove -y
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Add all of the files!
ADD . .
# Run grunt
RUN cd grunt && grunt
ADD conf/init/copy_robots_txt.sh /etc/my_init.d/
ADD conf/init/doupdatelimits.sh /etc/my_init.d/
ADD conf/init/copy_syslog_config.sh /etc/my_init.d/
ADD conf/init/runmigration.sh /etc/my_init.d/
ADD conf/init/service/ /etc/service/
RUN rm -rf /etc/service/syslog-forwarder
# Download any external libs.
RUN mkdir static/fonts static/ldn
RUN venv/bin/python -m external_libraries
2015-03-03 23:17:05 +00:00
RUN mkdir /usr/local/nginx/logs/
# Run the tests
2015-02-27 22:21:22 +00:00
RUN TEST=true venv/bin/python -m unittest discover -f
2015-05-29 22:08:17 +00:00
RUN TEST=true venv/bin/python -m test.registry_tests -f
RUN PYTHONPATH=. venv/bin/alembic heads > ALEMBIC_HEAD
VOLUME ["/conf/stack", "/var/log", "/datastorage", "/tmp", "/conf/etcd"]
2015-01-23 20:19:04 +00:00
EXPOSE 443 8443 80