From d8707fc5f83d0ad6dfe5f02188cb099462eb5484 Mon Sep 17 00:00:00 2001 From: Orwa Diraneyya Date: Thu, 9 Jan 2025 13:38:09 +0100 Subject: [PATCH 1/3] Initial commit in branch 'officialimages_issue-18171' --- 1/apache/Dockerfile | 2 ++ 1/fpm/Dockerfile | 2 +- docker-compose.yml => compose.apache.yml | 0 compose.fpm.yml | 18 ++++++++++++++++++ compose.yml | 1 + 5 files changed, 22 insertions(+), 1 deletion(-) rename docker-compose.yml => compose.apache.yml (100%) create mode 100644 compose.fpm.yml create mode 120000 compose.yml diff --git a/1/apache/Dockerfile b/1/apache/Dockerfile index 1ce9aea..d227d60 100644 --- a/1/apache/Dockerfile +++ b/1/apache/Dockerfile @@ -24,5 +24,7 @@ RUN curl -fSL "https://github.com/backdrop/backdrop/archive/refs/tags/${BACKDROP # Add custom entrypoint to set BACKDROP_SETTINGS correctly COPY docker-entrypoint.sh /entrypoint.sh +EXPOSE 80 + ENTRYPOINT ["/entrypoint.sh"] CMD ["apache2-foreground"] diff --git a/1/fpm/Dockerfile b/1/fpm/Dockerfile index 04dbdae..3475bfa 100644 --- a/1/fpm/Dockerfile +++ b/1/fpm/Dockerfile @@ -13,7 +13,7 @@ WORKDIR /var/www/html ENV BACKDROP_VERSION=1.29.2 ENV BACKDROP_MD5=dcb27feb72d78f1f14120d4c9a6bc70b -RUN curl -fSL "https://github.com/backdrop/backdrop/archive/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \ +RUN curl -fSL "https://github.com/backdrop/backdrop/archive/refs/tags/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \ && echo "${BACKDROP_MD5} *backdrop.tar.gz" | md5sum -c - \ && tar -xz --strip-components=1 -f backdrop.tar.gz \ && rm backdrop.tar.gz \ diff --git a/docker-compose.yml b/compose.apache.yml similarity index 100% rename from docker-compose.yml rename to compose.apache.yml diff --git a/compose.fpm.yml b/compose.fpm.yml new file mode 100644 index 0000000..8d30805 --- /dev/null +++ b/compose.fpm.yml @@ -0,0 +1,18 @@ +services: + backdrop: + build: + context: ./1/fpm + ports: + - 8088:80 + environment: + BACKDROP_DB_HOST: db + BACKDROP_DB_USER: backdrop + BACKDROP_DB_PASSWORD: backdrop + + db: + image: mysql + environment: + MYSQL_USER: backdrop + MYSQL_PASSWORD: backdrop + MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' + MYSQL_DATABASE: backdrop diff --git a/compose.yml b/compose.yml new file mode 120000 index 0000000..db884ee --- /dev/null +++ b/compose.yml @@ -0,0 +1 @@ +compose.apache.yml \ No newline at end of file From a945e319a8c391e6274fc6909040862944be6c34 Mon Sep 17 00:00:00 2001 From: Orwa Diraneyya Date: Thu, 9 Jan 2025 15:55:20 +0100 Subject: [PATCH 2/3] Add changes for issue 18171 from official images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This repo is outdated. The current compose files are only intended for testing/evaluation, and there is currently no working compose file for testing the 'fpm' variant of the image. This likely needs work, which I will be attending to after my Einbürgerungstest, which is tomorrow. --- 1/fpm/Dockerfile | 2 ++ compose.apache.yml | 9 +++++++++ compose.fpm.yml | 18 ------------------ 3 files changed, 11 insertions(+), 18 deletions(-) delete mode 100644 compose.fpm.yml diff --git a/1/fpm/Dockerfile b/1/fpm/Dockerfile index 3475bfa..6f71a9a 100644 --- a/1/fpm/Dockerfile +++ b/1/fpm/Dockerfile @@ -22,5 +22,7 @@ RUN curl -fSL "https://github.com/backdrop/backdrop/archive/refs/tags/${BACKDROP # Add custom entrypoint to set BACKDROP_SETTINGS correctly COPY docker-entrypoint.sh /entrypoint.sh +EXPOSE 9000 + ENTRYPOINT ["/entrypoint.sh"] CMD ["php-fpm"] diff --git a/compose.apache.yml b/compose.apache.yml index ebf65a1..63b8ad2 100644 --- a/compose.apache.yml +++ b/compose.apache.yml @@ -1,3 +1,4 @@ +name: docker-evaluation services: backdrop: build: @@ -8,6 +9,10 @@ services: BACKDROP_DB_HOST: db BACKDROP_DB_USER: backdrop BACKDROP_DB_PASSWORD: backdrop + depends_on: + db: + condition: service_healthy + restart: true db: image: mysql @@ -16,3 +21,7 @@ services: MYSQL_PASSWORD: backdrop MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' MYSQL_DATABASE: backdrop + healthcheck: + test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"] + timeout: 6s + retries: 10 diff --git a/compose.fpm.yml b/compose.fpm.yml deleted file mode 100644 index 8d30805..0000000 --- a/compose.fpm.yml +++ /dev/null @@ -1,18 +0,0 @@ -services: - backdrop: - build: - context: ./1/fpm - ports: - - 8088:80 - environment: - BACKDROP_DB_HOST: db - BACKDROP_DB_USER: backdrop - BACKDROP_DB_PASSWORD: backdrop - - db: - image: mysql - environment: - MYSQL_USER: backdrop - MYSQL_PASSWORD: backdrop - MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' - MYSQL_DATABASE: backdrop From f1630c4e3f1cf8b6797983011ced1505a380a652 Mon Sep 17 00:00:00 2001 From: Orwa Diraneyya Date: Fri, 10 Jan 2025 21:37:08 +0100 Subject: [PATCH 3/3] Ports were already expose in base image --- 1/apache/Dockerfile | 2 -- 1/fpm/Dockerfile | 2 -- 2 files changed, 4 deletions(-) diff --git a/1/apache/Dockerfile b/1/apache/Dockerfile index d227d60..1ce9aea 100644 --- a/1/apache/Dockerfile +++ b/1/apache/Dockerfile @@ -24,7 +24,5 @@ RUN curl -fSL "https://github.com/backdrop/backdrop/archive/refs/tags/${BACKDROP # Add custom entrypoint to set BACKDROP_SETTINGS correctly COPY docker-entrypoint.sh /entrypoint.sh -EXPOSE 80 - ENTRYPOINT ["/entrypoint.sh"] CMD ["apache2-foreground"] diff --git a/1/fpm/Dockerfile b/1/fpm/Dockerfile index 6f71a9a..3475bfa 100644 --- a/1/fpm/Dockerfile +++ b/1/fpm/Dockerfile @@ -22,7 +22,5 @@ RUN curl -fSL "https://github.com/backdrop/backdrop/archive/refs/tags/${BACKDROP # Add custom entrypoint to set BACKDROP_SETTINGS correctly COPY docker-entrypoint.sh /entrypoint.sh -EXPOSE 9000 - ENTRYPOINT ["/entrypoint.sh"] CMD ["php-fpm"]