forked from datatrails/datatrails-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-builder
34 lines (27 loc) · 879 Bytes
/
Dockerfile-builder
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
ARG VERSION=3.7
FROM python:${VERSION}-bullseye
# Note that any deps installed here must also be installed in the
# github actions workflows:
#
# .github/workflows/python-package.yml
# .github/workflows/python-publish.yml
#
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& apt-get install -y libenchant-2-2 \
&& apt-get autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt requirements-dev.txt /tmp/
RUN python3 -m pip install --upgrade pip \
&& python3 -m pip install -U -r /tmp/requirements-dev.txt \
&& rm -f /tmp/requirements-dev.txt \
&& rm -f /tmp/requirements.txt
ENV USER=builder
ENV HOME=/home/${USER}
ENV PATH=${HOME}/.local/bin:${PATH}
ENV PYTHONPATH=${HOME}/archivist:${PYTHONPATH}
RUN mkdir -p ${HOME}
WORKDIR ${HOME}