Skip to content

[~] {1-30899} Core: Docker development: Was added support for php8.1. #20

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
run:
docker-compose up -d --build nginx mysql5.7 php8.0 php7.4 php7.3
docker-compose up -d --build nginx mysql5.7 php8.1 php8.0 php7.4 php7.3

cli-7.3: run
docker exec -it php7.3 bash
Expand All @@ -9,3 +9,6 @@ cli-7.4: run

cli-8.0: run
docker exec -it php8.0 bash

cli-8.1: run
docker exec -it php8.1 bash
6 changes: 4 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ English manual

Docker-based development environment:

* PHP versions: 8.0, 7.4 and 7.3.
* PHP versions: 8.1, 8.0, 7.4 and 7.3.
* MySQL 5.7 database server.
* nginx web server.

Expand Down Expand Up @@ -66,6 +66,7 @@ To use the specific PHP version for your requests, add the following prefix to t
* ``php7.3.`` for PHP 7.3.
* ``php7.4.`` for PHP 7.4.
* ``php8.0.`` for PHP 8.0.
* ``php8.1.`` for PHP 8.1.

---------------
Sending e-mails
Expand Down Expand Up @@ -114,7 +115,7 @@ Uncomment the lines in docker-compose.yml and run the following commands:

Среда для разработки на базе Docker:

* Версии PHP: 8.0, 7.4 и 7.3.
* Версии PHP: 8.1, 8.0, 7.4 и 7.3.
* Сервер баз данных MySQL 5.7.
* Веб-сервер nginx.

Expand Down Expand Up @@ -168,6 +169,7 @@ Uncomment the lines in docker-compose.yml and run the following commands:
* ``php7.3.`` для PHP 7.3.
* ``php7.4.`` для PHP 7.4.
* ``php8.0.`` для PHP 8.0.
* ``php8.1.`` для PHP 8.1.

------------------
Отправка e-mail'ов
Expand Down
1 change: 1 addition & 0 deletions config/nginx/app.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ map $http_host $fastcgi_backend {
~^php7.3. php7.3:9000;
~^php7.4. php7.4:9000;
~^php8.0. php8.0:9000;
~^php8.1. php8.1:9000;
}

server {
Expand Down
2 changes: 1 addition & 1 deletion config/php8.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:8.0-fpm
FROM php:8.0-rc-fpm

ENV VERSION_ONIG=6.9.3
ENV ONIG_BUILD_DIR=/tmp/oniguruma
Expand Down
39 changes: 39 additions & 0 deletions config/php8.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
FROM php:8.1-rc-fpm

ENV VERSION_ONIG=6.9.3
ENV ONIG_BUILD_DIR=/tmp/oniguruma

RUN set -xe; \
mkdir -p ${ONIG_BUILD_DIR}; \
curl -Ls https://github.com/kkos/oniguruma/releases/download/v${VERSION_ONIG}/onig-${VERSION_ONIG}.tar.gz \
| tar xzC ${ONIG_BUILD_DIR} --strip-components=1; \
cd ${ONIG_BUILD_DIR}/; \
./configure; \
make -j $(nproc); \
make install

RUN set -xe; \
mkdir -p /usr/src/php/ext/imagick; \
curl -fsSL http://pecl.php.net/get/imagick-3.7.0.tgz \
| tar xvz -C "/usr/src/php/ext/imagick" --strip-components=1;

RUN set -xe; \
apt update; \
apt install --yes \
mariadb-client \
git \
zip unzip \
curl \
libzip-dev libcurl4-gnutls-dev libpng-dev libxml2-dev libjpeg-dev libfreetype6-dev \
libmagickwand-dev; \
curl -sL https://deb.nodesource.com/setup_12.x | bash -; \
apt install -y nodejs; \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/; \
docker-php-ext-install pdo_mysql mysqli gd zip intl soap mbstring exif bcmath curl sockets; \
docker-php-ext-install imagick; \
docker-php-ext-enable imagick; \
docker-php-ext-enable mysqli;

# RUN set -xe ; \
# pecl install xdebug; \
# docker-php-ext-enable xdebug
7 changes: 7 additions & 0 deletions config/php8.1/php-ini-overrides.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
upload_max_filesize = 100M
post_max_size = 108M
max_execution_time = 3600
sendmail_path = "/usr/local/bin/sendmail --logdir=/app/log/sendmail/ "
xdebug.mode=debug
xdebug.client_host=host.docker.internal
xdebug.start_with_request=yes
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ services:
- php7.3
- php7.4
- php8.0
- php8.1

php7.3:
build:
Expand Down Expand Up @@ -65,6 +66,19 @@ services:
environment:
PHP_IDE_CONFIG: serverName=localhost

php8.1:
build:
context: ./config/php8.1
dockerfile: Dockerfile
container_name: php8.1
working_dir: /app
volumes:
- ./app:/app
- ./config/php8.1/php-ini-overrides.ini:/usr/local/etc/php/conf.d/00-php.ini
- ./bin/sendmail:/usr/local/bin/sendmail
environment:
PHP_IDE_CONFIG: serverName=localhost

# Change default subnet addresses (for uncomment - delete only '#'):
#networks:
# default:
Expand Down