forked from mozilla-releng/balrog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.test
41 lines (33 loc) · 1.61 KB
/
Dockerfile.test
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
40
41
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-slim
MAINTAINER [email protected]
# netcat is needed for health checks
# Some versions of the python:3.8 Docker image remove libpcre3, which uwsgi needs for routing support to be enabled.
# default-libmysqlclient-dev is required to use SQLAlchemy with MySQL
# mariadb-client is needed to import sample data
# curl is needed to pull sample data
# gcc is needed to compile some python packages
# xz-utils is needed to unpack sampled ata
# git is needed to send coverage reports
RUN apt-get -q update \
&& apt-get -q --yes install g++ netcat-traditional libpcre3 libpcre3-dev default-libmysqlclient-dev mariadb-client curl gcc xz-utils git pkg-config \
&& apt-get clean
WORKDIR /app
RUN git config --global --add safe.directory /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/ /app/requirements/
RUN pip install --no-deps -r requirements/local.txt
COPY src/ /app/src/
COPY tests/ /app/tests/
COPY scripts/ /app/scripts/
COPY uwsgi/ /app/uwsgi/
COPY MANIFEST.in setup.py pyproject.toml tox.ini version.json version.txt /app/
# we need .git to gather information for coverage reports
COPY .git/ /app/.git/
RUN python setup.py develop
# 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"]