From ad88679e61c2b1f40c4c1bae2bf2d2e1878042ae Mon Sep 17 00:00:00 2001 From: Shish Date: Tue, 10 Dec 2019 01:13:24 +0000 Subject: [PATCH] php7.4 in docker --- .github/workflows/test_and_publish.yml | 3 ++- Dockerfile | 14 +++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test_and_publish.yml b/.github/workflows/test_and_publish.yml index 0d988786..eabd4150 100644 --- a/.github/workflows/test_and_publish.yml +++ b/.github/workflows/test_and_publish.yml @@ -10,6 +10,7 @@ jobs: test: name: PHP ${{ matrix.php }} / DB ${{ matrix.database }} strategy: + max-parallel: 3 fail-fast: false matrix: php: ['7.3', '7.4'] @@ -25,7 +26,7 @@ jobs: with: php-version: ${{ matrix.php }} coverage: pcov - extensions: mbstring, pdo-sqlite, pdo-pgsql, pdo-mysql, gd + extensions: mbstring - name: Set up database run: | diff --git a/Dockerfile b/Dockerfile index c7c6b1d9..77c8bfb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # "Build" shimmie (composer install - done in its own stage so that we don't # need to include all the composer fluff in the final image) -FROM debian:stable-slim AS app -RUN apt update && apt install -y composer php7.3-gd php7.3-dom php7.3-sqlite3 php-xdebug imagemagick +FROM debian:testing-slim AS app +RUN apt update && apt install -y composer php7.4-gd php7.4-dom php7.4-sqlite3 php-xdebug imagemagick COPY composer.json composer.lock /app/ WORKDIR /app RUN composer install --no-dev @@ -10,8 +10,8 @@ COPY . /app/ # Tests in their own image. Really we should inherit from app and then # `composer install` phpunit on top of that; but for some reason # `composer install --no-dev && composer install` doesn't install dev -FROM debian:stable-slim AS tests -RUN apt update && apt install -y composer php7.3-gd php7.3-dom php7.3-sqlite3 php-xdebug imagemagick +FROM debian:testing-slim AS tests +RUN apt update && apt install -y composer php7.4-gd php7.4-dom php7.4-sqlite3 php-xdebug imagemagick COPY composer.json composer.lock /app/ WORKDIR /app RUN composer install @@ -25,7 +25,7 @@ RUN [ $RUN_TESTS = false ] || (\ echo '=== Cleaning ===' && rm -rf data) # Build su-exec so that our final image can be nicer -FROM debian:stable-slim AS suexec +FROM debian:testing-slim AS suexec RUN apt-get update && apt-get install -y --no-install-recommends gcc libc-dev curl RUN curl -k -o /usr/local/bin/su-exec.c https://raw.githubusercontent.com/ncopa/su-exec/master/su-exec.c; \ gcc -Wall /usr/local/bin/su-exec.c -o/usr/local/bin/su-exec; \ @@ -33,13 +33,13 @@ RUN curl -k -o /usr/local/bin/su-exec.c https://raw.githubusercontent.com/ncopa chmod 0755 /usr/local/bin/su-exec; # Actually run shimmie -FROM debian:stable-slim +FROM debian:testing-slim EXPOSE 8000 HEALTHCHECK --interval=5m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1 ENV UID=1000 \ GID=1000 RUN apt update && apt install -y curl \ - php7.3-cli php7.3-gd php7.3-pgsql php7.3-mysql php7.3-sqlite3 php7.3-zip php7.3-dom php7.3-mbstring \ + php7.4-cli php7.4-gd php7.4-pgsql php7.4-mysql php7.4-sqlite3 php7.4-zip php7.4-dom php7.4-mbstring \ imagemagick zip unzip && \ rm -rf /var/lib/apt/lists/* COPY --from=app /app /app