forked from mozilla-releng/balrog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
39 lines (33 loc) · 1.85 KB
/
Dockerfile.dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# NOTE: The only supported way to use the Balrog dev image is with a volume mount of /app.
# Because of this, the only things we do in the Dockerfile are install things to
# system locations (some system packages and some python packages).
# Things that are fully local to /app (such as npm requirements and the built UI)
# are done as needed in the entrypoint.
FROM python:2.7-slim
MAINTAINER [email protected]
# Some versions of the python:2.7 Docker image remove libpcre3, which uwsgi needs for routing support to be enabled.
# Node and npm are to build the frontend. nodejs-legacy is needed by this version of npm.
# mysql-client is needed to import sample data
# libmysqlclient-dev is required to use SQLAlchemy with MySQL, which we do in production.
# libfontconfig1 is required by phantomjs
RUN apt-get -q update \
&& apt-get -q --yes install netcat libpcre3 libpcre3-dev nodejs nodejs-legacy npm libmysqlclient-dev mysql-client \
libfontconfig1 netcat \
&& apt-get clean
WORKDIR /app
# The general app requirements and packages required to run Tox are installed into the system.
# We copy them in early to avoid re-installing them unless absolutely necessary.
COPY requirements.txt requirements-tox.txt /app/
RUN pip install -r requirements.txt
RUN pip install -r requirements-tox.txt
COPY aus-data-snapshots/ /app/aus-data-snapshots/
COPY auslib/ /app/auslib/
COPY ui/ /app/ui/
COPY scripts/ /app/scripts/
COPY uwsgi/ /app/uwsgi/
COPY .coveragerc MANIFEST.in requirements-test.txt setup.py tox.ini version.json version.txt /app/
# Using /bin/bash as the entrypoint works around some volume mount issues on Windows
# where volume-mounted files do not have execute bits set.
# https://github.com/docker/compose/issues/2301#issuecomment-154450785 has additional background.
ENTRYPOINT ["/bin/bash", "/app/scripts/run.sh"]
CMD ["public"]