This repository was archived by the owner on Jan 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 1.35 KB
/
Dockerfile
File metadata and controls
33 lines (26 loc) · 1.35 KB
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
33
FROM python:3.10-alpine
ARG VCS_REF
ARG BUILD_DATE
LABEL org.opencontainers.image.authors="Tobias Hargesheimer <docker@ison.ws>" \
#org.opencontainers.image.version="${VCS_REF}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}" \
org.opencontainers.image.title="WH-Mainz Internet Login" \
org.opencontainers.image.description="Wohnheime Mainz Internet Login/Logout HTTPD (AlpineLinux with Python3)" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="ghcr.io/tob1as/internetloginwithpythonwebservice:latest" \
org.opencontainers.image.source="https://github.com/Tob1as/internetloginwithpythonwebservice"
SHELL ["/bin/sh", "-euxo", "pipefail", "-c"]
COPY login_wohnheim_uni_mainz_de-webservice.py /service/login_wohnheim_uni_mainz_de-webservice.py
RUN \
addgroup --gid 1000 webserver ; \
adduser --system --shell /bin/sh --uid 1000 --ingroup webserver --home /service webserver ; \
chown webserver:webserver /service/login_wohnheim_uni_mainz_de-webservice.py ; \
chmod +x /service/login_wohnheim_uni_mainz_de-webservice.py ; \
pip3 install --no-cache-dir requests ; \
pip3 install --no-cache-dir beautifulsoup4
WORKDIR /service
USER webserver
STOPSIGNAL SIGINT
EXPOSE 8000
CMD ["python3", "-u", "./login_wohnheim_uni_mainz_de-webservice.py"]