-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (25 loc) · 730 Bytes
/
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
FROM python:3.11.0b4-buster
ARG _USER="spacy"
ARG _UID="1001"
ARG _GID="100"
ARG _SHELL="/bin/bash"
# Install apt dependencies
RUN apt-get update && apt-get install -y \
nano \
git \
wget
RUN useradd -m -s "${_SHELL}" -N -u "${_UID}" "${_USER}"
ENV USER ${_USER}
ENV UID ${_UID}
ENV GID ${_GID}
ENV HOME /home/${_USER}
ENV PATH "${HOME}/.local/bin/:${PATH}"
ENV PIP_NO_CACHE_DIR "true"
RUN mkdir /home/${_USER}/app && chown ${UID}:${GID} /home/${_USER}/app
USER ${_USER}
COPY --chown=${UID}:${GID} config* /home/${_USER}/app
COPY --chown=${UID}:${GID} requirements* /home/${_USER}/app
COPY --chown=${UID}:${GID} ./* /home/${_USER}/app/
WORKDIR /home/${_USER}/app
RUN pip install -r requirements.txt
CMD bash