-
Notifications
You must be signed in to change notification settings - Fork 1
/
testing.dockerfile
44 lines (32 loc) · 1.33 KB
/
testing.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
38
39
40
41
42
43
44
FROM osgeo/gdal:ubuntu-full-3.1.0 as build-stage-1
RUN apt-get update \
&& apt-get install -y gcc make g++ git python3-pip \
&& pip3 install --upgrade pip
RUN pip3 install --upgrade pip \
&& pip3 install --prefix=/usr/local "pycld2==0.41"
RUN pip3 install --prefix=/usr/local \
git+https://github.com/OpertusMundi/[email protected] \
git+https://github.com/OpertusMundi/[email protected]
FROM osgeo/gdal:ubuntu-full-3.1.0
ARG VERSION
RUN apt-get update \
&& apt-get install -y --no-install-recommends python3-pip libicu-dev python3-icu
ENV VERSION="${VERSION}"
ENV PYTHON_VERSION="3.8"
ENV PYTHONPATH="/usr/local/lib/python${PYTHON_VERSION}/site-packages"
RUN groupadd flask \
&& useradd -m -d /var/local/geoprofile -g flask flask
COPY --from=build-stage-1 /usr/local/ /usr/local/
RUN pip3 install --upgrade pip
COPY requirements.txt requirements-testing.txt ./
RUN pip3 install --prefix=/usr/local -r requirements.txt -r requirements-testing.txt
RUN python -c "import nltk; nltk.download('punkt', '/usr/local/share/nltk_data')"
ENV FLASK_APP="geoprofile" \
SCHEMATA_PATH="/usr/local/geoprofile/geoprofile/schemata" \
FLASK_ENV="testing" \
FLASK_DEBUG="false" \
INPUT_DIR="./input" \
OUTPUT_DIR="./output"
COPY run-nosetests.sh /
RUN chmod a+x /run-nosetests.sh
ENTRYPOINT ["/run-nosetests.sh"]