From e462d6d68e6953d4920758dbcd75aecacc22464f Mon Sep 17 00:00:00 2001 From: Aboubacar OUATTARA - kaira Date: Sun, 25 Feb 2024 18:29:32 -0500 Subject: [PATCH] Add Docker configurations for PHP 7.4, 8.0, and 8.2 New Docker configuration files have been added to standardize the PHP 7.4, 8.0, and 8.2 environments. Additionally, the "composer.lock" file has been added to the .gitignore file, and the version range of the "orchestra/testbench" dependency in composer.json has been expanded. An .gitattributes file was added to ignore the .docker directory during export. --- .docker/Dockerfile-php80 | 23 +++++++++++++++++++++++ .docker/Dockerfile-php82 | 23 +++++++++++++++++++++++ .docker/docker-compose-php74.yml | 10 ++++++++++ .docker/docker-compose-php80.yml | 10 ++++++++++ .docker/docker-compose-php82.yml | 10 ++++++++++ .gitattributes | 1 + .gitignore | 1 + composer.json | 2 +- 8 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 .docker/Dockerfile-php80 create mode 100644 .docker/Dockerfile-php82 create mode 100644 .docker/docker-compose-php74.yml create mode 100644 .docker/docker-compose-php80.yml create mode 100644 .docker/docker-compose-php82.yml create mode 100644 .gitattributes diff --git a/.docker/Dockerfile-php80 b/.docker/Dockerfile-php80 new file mode 100644 index 0000000..5e3e2fa --- /dev/null +++ b/.docker/Dockerfile-php80 @@ -0,0 +1,23 @@ +FROM php:8.0-fpm + +RUN apt-get update && apt-get install -y \ + zip \ + unzip \ + git \ + curl \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + libonig-dev \ + libxml2-dev \ + libzip-dev \ + pkg-config \ + libssl-dev + +RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd pdo_mysql zip mbstring exif pcntl bcmath opcache gettext + +# install composer +COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer + +WORKDIR /var/www \ No newline at end of file diff --git a/.docker/Dockerfile-php82 b/.docker/Dockerfile-php82 new file mode 100644 index 0000000..7180d6f --- /dev/null +++ b/.docker/Dockerfile-php82 @@ -0,0 +1,23 @@ +FROM php:8.2-fpm + +RUN apt-get update && apt-get install -y \ + zip \ + unzip \ + git \ + curl \ + libfreetype6-dev \ + libjpeg62-turbo-dev \ + libpng-dev \ + libonig-dev \ + libxml2-dev \ + libzip-dev \ + pkg-config \ + libssl-dev + +RUN docker-php-ext-configure gd --with-freetype --with-jpeg \ + && docker-php-ext-install -j$(nproc) gd pdo_mysql zip mbstring exif pcntl bcmath opcache gettext + +# install composer +COPY --from=composer:2 /usr/bin/composer /usr/local/bin/composer + +WORKDIR /var/www \ No newline at end of file diff --git a/.docker/docker-compose-php74.yml b/.docker/docker-compose-php74.yml new file mode 100644 index 0000000..bdd4efc --- /dev/null +++ b/.docker/docker-compose-php74.yml @@ -0,0 +1,10 @@ +version: "3.8" + +services: + php74: + build: + context: . + dockerfile: Dockerfile-php74 + volumes: + - ../:/var/www + working_dir: /var/www \ No newline at end of file diff --git a/.docker/docker-compose-php80.yml b/.docker/docker-compose-php80.yml new file mode 100644 index 0000000..e936fb3 --- /dev/null +++ b/.docker/docker-compose-php80.yml @@ -0,0 +1,10 @@ +version: "3.8" + +services: + php80: + build: + context: . + dockerfile: Dockerfile-php80 + volumes: + - ../:/var/www + working_dir: /var/www \ No newline at end of file diff --git a/.docker/docker-compose-php82.yml b/.docker/docker-compose-php82.yml new file mode 100644 index 0000000..5042df2 --- /dev/null +++ b/.docker/docker-compose-php82.yml @@ -0,0 +1,10 @@ +version: "3.8" + +services: + php82: + build: + context: . + dockerfile: Dockerfile-php82 + volumes: + - ../:/var/www + working_dir: /var/www \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..84149ba --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +.docker/ export-ignores \ No newline at end of file diff --git a/.gitignore b/.gitignore index e11163e..5a7f519 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor/ .idea .phpunit.result.cache +composer.lock diff --git a/composer.json b/composer.json index d16cc9f..7e3c6be 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "aws/aws-php-sns-message-validator": "^1.6" }, "require-dev": { - "orchestra/testbench": "^7.0", + "orchestra/testbench": "^6.0|^7.0", "phpunit/phpunit": "^9.5" }, "autoload": {