forked from eiffel-community/etos-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 943 Bytes
/
Dockerfile
File metadata and controls
31 lines (24 loc) · 943 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
FROM python:3.13-trixie AS build
COPY .git /src/.git
COPY .gitignore /src/.gitignore
COPY python /src/python
WORKDIR /src/python
RUN pip install --no-cache-dir build==1.3.0 && python3 -m build
FROM python:3.13-slim-trixie
ARG TZ
ENV TZ=$TZ
COPY --from=build /src/python/dist/*.whl /tmp/
# hadolint ignore=DL3013
# hadolint ignore=DL3008
RUN apt-get update && \
apt-get install -y gcc libc-dev tzdata --no-install-recommends && \
pip install --no-cache-dir /tmp/*.whl && \
apt-get purge -y --auto-remove gcc libc-dev && \
rm -rf /var/lib/apt/lists/*
RUN groupadd -r etos && useradd -r -m -s /bin/false -g etos etos
USER etos
EXPOSE 8080
LABEL org.opencontainers.image.source=https://github.com/eiffel-community/etos-api
LABEL org.opencontainers.image.authors=etos-maintainers@googlegroups.com
LABEL org.opencontainers.image.licenses=Apache-2.0
ENTRYPOINT ["uvicorn", "etos_api.main:APP", "--host=0.0.0.0", "--port=8080"]