-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathDockerfile
30 lines (22 loc) · 808 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
30
FROM python:3.10-alpine
# Preventing Python from writing pyc files to disk
ENV PYTHONDONTWRITEBYTECODE 1
# Preventing Python from buffering stdout and stderr
ENV PYTHONUNBUFFERED 1
# create the app user
RUN addgroup -S d1090exp && adduser -S d1090exp -G d1090exp
COPY ./dist/dump1090exporter-*-py3-none-any.whl /tmp/
# install dump1090exporter (including dependencies and requirements)
RUN \
apk update && \
apk add --no-cache --virtual .build-deps musl-dev gcc && \
pip install pip -U --no-cache-dir && \
pip install /tmp/dump1090exporter-*-py3-none-any.whl --no-cache-dir && \
apk --purge del .build-deps && \
rm -rf /tmp/dump1090exporter-*-py3-none-any.whl
# switch to non-root user
USER d1090exp
WORKDIR /tmp
EXPOSE 9105
ENTRYPOINT ["python", "-m", "dump1090exporter"]
CMD ["--help"]