diff --git a/docker/.env b/docker/.env.example similarity index 66% rename from docker/.env rename to docker/.env.example index 21e10d2..ee5c236 100644 --- a/docker/.env +++ b/docker/.env.example @@ -1,2 +1,3 @@ XDEBUG_HOST=localhost XDEBUG_PORT=9000 +GITHUB_API_TOKEN="" diff --git a/docker/Dockerfile b/docker/Dockerfile index bc2c947..1b7ebd9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM php:7.4-cli as php +FROM php:8.1-cli as php RUN apt-get update -y \ && apt-get install -y \ @@ -43,7 +43,7 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ FROM php as base RUN apt-get update -y \ - && apt-get install -y git python3-pip openssh-client \ + && apt-get install -y git python3-pip openssh-client gpg \ && apt-get install -y ruby \ && gem install yamlclean @@ -61,9 +61,9 @@ RUN composer -vvv global require silverstripe/cow:${COW_VERSION} \ && chmod 755 /root \ && ln -s /root/.composer/vendor/bin/cow /usr/bin/. \ && groupadd -f -g ${GROUP_ID} cow \ - && useradd -g ${GROUP_ID} -d /home/cow -m -u ${USER_ID} cow \ - && mkdir -p /home/cow/.composer/cache \ - && chown -R cow:cow /home/cow/.composer + && useradd -g ${GROUP_ID} -d /home/cow -m -u ${USER_ID} cow +# && mkdir -p /home/cow/.cache/composer/cache \ +# && chown -R cow:cow /home/cow/.cache/composer USER cow WORKDIR /home/cow @@ -76,6 +76,6 @@ FROM stable as debug USER root RUN docker-php-source extract \ - && yes '' | pecl install xdebug-2.9.8 && docker-php-ext-enable xdebug \ + && yes '' | pecl install xdebug && docker-php-ext-enable xdebug \ && docker-php-source delete -USER cow \ No newline at end of file +USER cow diff --git a/docker/bin/run b/docker/bin/run index 92b28a7..c8454f2 100755 --- a/docker/bin/run +++ b/docker/bin/run @@ -48,13 +48,13 @@ docker_compose_params() docker_compose_run() { cd $DOCKER_DIR && \ - docker-compose run --rm $(docker_compose_params) $EXTRA_FLAGS $1 ${@:2} + docker compose run --rm $(docker_compose_params) $EXTRA_FLAGS $1 ${@:2} } docker_compose_pull() { cd $DOCKER_DIR && \ - GIT_CONFIG=$GIT_CONFIG USER_ID=$USER_ID GROUP_ID=$GROUP_ID docker-compose build --pull $1 ${@:2} + GIT_CONFIG=$GIT_CONFIG USER_ID=$USER_ID GROUP_ID=$GROUP_ID docker compose build --pull $1 ${@:2} } if [ ! -z "$SKIP_RUN_EXEC" ] ; then diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index cf22292..0b5b0ac 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -62,4 +62,4 @@ services: network_mode: 'host' volumes: *volumes entrypoint: *entrypoint - environment: *environment \ No newline at end of file + environment: *environment diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index 05f5dd8..0c82aa1 100755 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -60,4 +60,4 @@ if [ ! -z "$COW_MODE_PHPCS" ] ; then exit; fi -$DIR/bin/cow $@ \ No newline at end of file +$DIR/bin/cow $@ diff --git a/docker/release/Dockerfile b/docker/release/Dockerfile index 71600f9..5a0cab9 100644 --- a/docker/release/Dockerfile +++ b/docker/release/Dockerfile @@ -5,6 +5,9 @@ ARG GROUP_ID=${GROUP_ID} USER root +RUN apt-get update -y \ + && apt-get install -y gpg + # Sync the user id and group id with the host machine RUN usermod -u ${USER_ID} -g ${GROUP_ID} cow && chown -R cow:cow /home/cow