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: