Skip to content

Commit

Permalink
Add Docker configurations for PHP 7.4, 8.0, and 8.2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Aboubacar OUATTARA - kaira committed Feb 25, 2024
1 parent 16a79d5 commit e462d6d
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .docker/Dockerfile-php80
Original file line number Diff line number Diff line change
@@ -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
23 changes: 23 additions & 0 deletions .docker/Dockerfile-php82
Original file line number Diff line number Diff line change
@@ -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
10 changes: 10 additions & 0 deletions .docker/docker-compose-php74.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.8"

services:
php74:
build:
context: .
dockerfile: Dockerfile-php74
volumes:
- ../:/var/www
working_dir: /var/www
10 changes: 10 additions & 0 deletions .docker/docker-compose-php80.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.8"

services:
php80:
build:
context: .
dockerfile: Dockerfile-php80
volumes:
- ../:/var/www
working_dir: /var/www
10 changes: 10 additions & 0 deletions .docker/docker-compose-php82.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3.8"

services:
php82:
build:
context: .
dockerfile: Dockerfile-php82
volumes:
- ../:/var/www
working_dir: /var/www
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.docker/ export-ignores
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor/
.idea
.phpunit.result.cache
composer.lock
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down

0 comments on commit e462d6d

Please sign in to comment.