forked from orf/django-docker-box
-
Notifications
You must be signed in to change notification settings - Fork 37
/
Dockerfile
37 lines (31 loc) · 1.24 KB
/
Dockerfile
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
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-slim-bullseye
RUN apt-get update \
&& apt-get install --no-install-recommends -y \
libmemcached-dev \
build-essential \
libsqlite3-mod-spatialite binutils libproj-dev gdal-bin libgdal28 libgeoip1 \
default-libmysqlclient-dev default-mysql-client \
libpq-dev \
unzip libaio1 \
libenchant-2-2 \
gettext \
wget \
git \
pkg-config \
&& apt-get clean
RUN groupadd -r test && useradd --no-log-init -r -g test test
RUN wget -q https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh -O /bin/wait-for-it.sh \
&& chmod a+x /bin/wait-for-it.sh
ENV PIP_NO_CACHE_DIR=off
ENV PYTHONDONTWRITEBYTECODE=1
RUN pip install --upgrade pip
COPY --chown=test:test tests/requirements/ /requirements/
RUN for f in /requirements/*.txt; do pip install -r $f; done && \
pip install flake8 flake8-isort sphinx pyenchant sphinxcontrib-spelling selenium unittest-xml-reporting
RUN mkdir /tests && chown -R test:test /tests
RUN mkdir /tests/results && chown -R test:test /tests/results/
USER test:test
ENV PYTHONPATH "${PYTHONPATH}:/tests/django/"
VOLUME /tests/django
WORKDIR /tests/django/tests