forked from eiffel-community/etos-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (22 loc) · 880 Bytes
/
Dockerfile
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
FROM python:3.9-bookworm AS build
COPY . /src
WORKDIR /src/python
RUN pip install --no-cache-dir build==1.2.2 && python3 -m build
FROM python:3.9-slim-bookworm
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"]