-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-builder
More file actions
40 lines (34 loc) · 983 Bytes
/
Dockerfile-builder
File metadata and controls
40 lines (34 loc) · 983 Bytes
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
ARG VERSION=3.12
FROM python:${VERSION}-bullseye
ARG NAME=whome
ARG UID=1000
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get upgrade -y --no-install-recommends \
&& apt-get install -y --fix-missing \
libenchant-2-2 \
pandoc \
&& apt-get autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
ENV USER=builder
ENV HOME=/home/${USER}
ENV PATH=${HOME}/bin:${HOME}/.local/bin:${PATH}
ENV PYTHONPATH=${HOME}/${NAME}
RUN useradd --uid ${UID} \
--user-group \
--shell /bin/bash \
-m \
-d ${HOME} \
--no-log-init \
builder
USER builder
WORKDIR ${HOME}/${NAME}
RUN mkdir ~/bin \
&& curl --proto '=https' \
--tlsv1.2 \
-sSf https://just.systems/install.sh | bash -s -- --to ${HOME}/bin
COPY requirements.txt ./
RUN python3 -m pip install --force-reinstall --user -r requirements.txt \
&& rm -f requirements.txt