From 609cc7cc7eab84cd346200fb36b9ecf93fe05e3d Mon Sep 17 00:00:00 2001 From: arjan Date: Tue, 21 Apr 2026 17:52:40 +0200 Subject: [PATCH] wat kleine verbeteringen --- .dockerignore | 15 +++++++++++++++ Dockerfile | 6 ++++-- distribution/docker-compose.yml | 9 ++++++--- 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..e09cf7093 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +# https://medium.com/@bounouh.fedi/mastering-the-dockerignore-file-boosting-docker-build-efficiency-398719f4a0e1 + +# Ignore version control (directories), not needed in container +.git +.git/ +.gitignore + +# If we're cacheing cpan modules, so they are not downloaded every time +# ignore these caches in the container +.cpanrc +cpan-cache/ + +# Ignore Docker-related files +Dockerfile* +.dockerignore diff --git a/Dockerfile b/Dockerfile index f198216ec..bee1e043b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:latest +FROM debian:trixie ENV DEBIAN_FRONTEND=noninteractive @@ -8,7 +8,7 @@ RUN apt update && apt -y install perl cpanminus libaspell-dev make libdbd-mysql- apache2 apache2-utils mailutils -RUN cpanm --notest --force \ +RUN cpanm --notest --no-cache --force \ Algorithm::Permute \ App::Cmd \ Archive::Any \ @@ -142,6 +142,8 @@ RUN cpanm --notest --force \ namespace::autoclean RUN apt -y remove libjson-xs-perl +RUN apt-get clean +RUN rm -rf /var/lib/apt/lists/* #RUN cpanm --notest --force \ # DBD::mysql@4.051 diff --git a/distribution/docker-compose.yml b/distribution/docker-compose.yml index 9fa9ddcd4..af39eaf88 100644 --- a/distribution/docker-compose.yml +++ b/distribution/docker-compose.yml @@ -13,10 +13,13 @@ services: volumes: - ./share/create.sql:/docker-entrypoint-initdb.d/1.sql ports: - - 3306 + - 3306:3306 webgui: - image: webgui + image: webgui:latest + build: + context: .. + dockerfile: Dockerfile container_name: webgui depends_on: - db @@ -38,4 +41,4 @@ services: #- "443:443" # TODO: serve staatic files directly from nginx #- ./www:/var/www/html:ro - \ No newline at end of file +