From d0f33bb00a6cb48245092c04205ad321c93eeda9 Mon Sep 17 00:00:00 2001 From: PageZ948 Date: Wed, 19 Aug 2026 12:35:46 +0000 Subject: [PATCH] build: add reproducible WebAVP container --- .dockerignore | 11 +++++++++++ Dockerfile | 31 +++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 .dockerignore create mode 100644 Dockerfile diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4431a2c --- /dev/null +++ b/.dockerignore @@ -0,0 +1,11 @@ +.git +.gitignore +node_modules +dist +__pycache__ +*.pyc +*.pyo +*.log +.hermes +Archive +backups diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d393fdf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,31 @@ +FROM python:3.12-alpine + +ARG VCS_REF=unknown + +LABEL org.opencontainers.image.title="Alta Video Player DEV" \ + org.opencontainers.image.description="WebAVP browser runtime for isolated DEV review" \ + org.opencontainers.image.source="https://git.pejicorp.com/peji/WebAVP" \ + org.opencontainers.image.revision="${VCS_REF}" + +ENV WEBAVP_HOST=0.0.0.0 \ + WEBAVP_PORT=5152 \ + PYTHONDONTWRITEBYTECODE=1 \ + PYTHONUNBUFFERED=1 + +WORKDIR /app + +RUN addgroup -S -g 10001 webavp \ + && adduser -S -D -H -u 10001 -G webavp webavp + +COPY --chown=10001:10001 app.py ./ +COPY --chown=10001:10001 static ./static +COPY --chown=10001:10001 templates ./templates + +USER 10001:10001 + +EXPOSE 5152 + +HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ + CMD python -c "import urllib.request; urllib.request.urlopen('http://127.0.0.1:5152/', timeout=3).read(1)" + +CMD ["python", "app.py"]