From 2fa4dafc4d354aeb345d5503bef7ca6572b566b8 Mon Sep 17 00:00:00 2001 From: Peter Smit Date: Fri, 17 Jan 2025 14:31:15 +0100 Subject: [PATCH] Actually truly really NOW actually for real truly now fix docker compose in updater --- updater/.env.example | 3 +++ updater/Dockerfile | 6 +++++- updater/docker-compose.yml | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/updater/.env.example b/updater/.env.example index d604cd2..f544b74 100644 --- a/updater/.env.example +++ b/updater/.env.example @@ -1,2 +1,5 @@ GITEA_WEBHOOK_SECRET= DOCKER_CONFIG_DIR= +DOCKER_CONFIG_DIR_UID= +DOCKER_CONFIG_DIR_GID= +DOCKER_GID= diff --git a/updater/Dockerfile b/updater/Dockerfile index a33b738..5d6eb3c 100644 --- a/updater/Dockerfile +++ b/updater/Dockerfile @@ -20,7 +20,11 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* # Add user to the docker group -RUN usermod -aG docker www-data +RUN usermod -aG $DOCKER_GID www-data + +# Create .docker directory and set permissions +RUN mkdir -p /var/www/.docker && \ + chown www-data:www-data /var/www/.docker # Copy the PHP file to the Apache document root COPY webhook.php /var/www/html/index.php diff --git a/updater/docker-compose.yml b/updater/docker-compose.yml index eb75e6a..b0ea4e1 100644 --- a/updater/docker-compose.yml +++ b/updater/docker-compose.yml @@ -1,7 +1,7 @@ services: updater: build: . - user: root + user: ${DOCKER_CONFIG_DIR_UID}:${DOCKER_CONFIG_DIR_GID} ports: - "6969:80" env_file: