-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (18 loc) · 816 Bytes
/
Dockerfile
File metadata and controls
30 lines (18 loc) · 816 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
FROM python:3.12-slim-bookworm
# Make a non-privledged user to run the pipeline
RUN mkdir /home/archive && /usr/sbin/groupadd -g 10000 "domainusers" \
&& /usr/sbin/useradd -g 10000 -d /home/archive -M -N -u 10087 archive \
&& chown -R archive:domainusers /home/archive
RUN pip install "poetry<2.2" --no-cache
RUN apt-get -y update && apt-get -y install gcc procps && \
apt-get autoclean && \
rm -rf /var/lib/apt/lists/*
RUN poetry config virtualenvs.create false
COPY pyproject.toml poetry.lock /lco/banzai/
RUN poetry install --directory=/lco/banzai -E cpu --no-root --no-cache
COPY . /lco/banzai
RUN poetry install --directory /lco/banzai -E cpu --no-cache
RUN cp /lco/banzai/pytest.ini /home/archive/pytest.ini
USER archive
ENV HOME=/home/archive
WORKDIR /home/archive