-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 799 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 799 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
FROM debian:bullseye-slim AS build
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /expander
RUN apt-get -y update \
&& apt-get install -y \
python3-virtualenv
COPY . /expander/
RUN virtualenv /opt/expander \
&& /opt/expander/bin/pip3 install . \
&& find /opt/expander/lib -name "*.so" | xargs strip \
&& find /opt/expander/lib -name "*.c" -delete
FROM debian:bullseye-slim
COPY --from=build /opt/expander/ /opt/expander/
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update -y \
&& apt-get install -y --no-install-suggests \
python3-minimal \
python3-distutils \
&& apt-get clean all \
&& find /var/lib/apt/lists -type f -delete
RUN groupadd -g 1000 expander
RUN useradd -g 1000 -u 1000 -m -d /var/lib/expander expander
USER expander
ENTRYPOINT ["/opt/expander/bin/expander-api"]