candipilot Version 1.0.0
This commit is contained in:
1 parent
a8cd533eae
commit
d69c79a267
3 files changed
+23
-16
No files matched your search
+9
-16
@@ -1,24 +1,17 @@
|
||||
FROM python:3.12-slim
|
||||
|
||||
ENV PYTHONUNBUFFERED=1 \
|
||||
PYTHONDONTWRITEBYTECODE=1 \
|
||||
TZ=Europe/Paris
|
||||
|
||||
# tzdata fournit les fuseaux horaires utilisés par les rappels.
|
||||
TZ=Europe/Paris \
|
||||
PUID=1000 \
|
||||
PGID=1000
|
||||
RUN apt-get update && apt-get full-upgrade -y \
|
||||
&& apt-get install -y --no-install-recommends tzdata nano \
|
||||
&& apt-get install -y --no-install-recommends tzdata nano gosu \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& groupadd --gid 1000 candipilot \
|
||||
&& useradd --uid 1000 --gid candipilot --no-create-home candipilot \
|
||||
&& mkdir -p /opt/candipilot /data \
|
||||
&& chown candipilot:candipilot /data
|
||||
|
||||
# Placer ap.py et favicon.png dans le même dossier que ce Dockerfile.
|
||||
&& mkdir -p /opt/candipilot /data
|
||||
COPY ap.py favicon.png /opt/candipilot/
|
||||
|
||||
# Le répertoire courant accueille la base SQLite et la favicon locale.
|
||||
# La favicon est copiée au démarrage pour fonctionner avec un volume neuf.
|
||||
COPY entrypoint.sh /usr/local/bin/candipilot-entrypoint
|
||||
RUN chmod 755 /usr/local/bin/candipilot-entrypoint \
|
||||
&& sed -i 's/\r$//' /usr/local/bin/candipilot-entrypoint
|
||||
WORKDIR /data
|
||||
USER candipilot
|
||||
EXPOSE 8000
|
||||
CMD ["sh", "-c", "cp /opt/candipilot/favicon.png /data/favicon.png && exec python /opt/candipilot/ap.py"]
|
||||
ENTRYPOINT ["/usr/local/bin/candipilot-entrypoint"]
|
||||
Reference in new issue
Block a user