-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (23 loc) · 780 Bytes
/
Dockerfile
File metadata and controls
25 lines (23 loc) · 780 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
FROM docker.io/python:3.12 AS build
WORKDIR /build
COPY . .
RUN python3 -m pip install --user pipx \
&& PATH=PATH:/root/.local/bin pipx install poetry \
&& PATH=PATH:/root/.local/bin poetry build
FROM docker.io/python:3.12-slim
COPY --from=build /build/dist ./dist
ENV DEBIAN_FRONTEND=noninteractive
RUN groupadd -g 1000 not_root && useradd -u 1000 -g 1000 not_root \
&& apt-get -y update \
&& apt-get -y install aptitude \
&& apt-get -y dist-upgrade \
&& apt-get -y autoremove \
&& apt-get -y autoclean \
&& apt-get -y clean \
&& aptitude -y purge '~o' \
&& apt-get -y remove --purge aptitude \
&& python3 -m pip install ./dist/boardwalk-*.whl \
&& rm -rf ./dist
USER not_root
WORKDIR /var/boardwalk
ENTRYPOINT ["python3", "-m"]