-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #56 from Aeliot-Tm/update-docker
Update build of docker container
- Loading branch information
Showing
5 changed files
with
63 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
ARG PHP_VERSION=8.2.7 | ||
ARG DEBIAN_RELEASE=bullseye | ||
|
||
FROM php:${PHP_VERSION}-cli-${DEBIAN_RELEASE} | ||
|
||
ARG COMPOSER_ALLOW_SUPERUSER=1 | ||
ARG COMPOSER_NO_INTERACTION=1 | ||
ARG COMPOSER_VERSION=2.7.6 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ARG DOCKER_PHP_DEPS='libxml2-dev libzip-dev unzip' | ||
ARG XDEBUG_VERSION=3.2.1 | ||
|
||
RUN set -xe; \ | ||
apt-get --allow-releaseinfo-change update && \ | ||
apt-get install -y -qq ${DOCKER_PHP_DEPS} --no-install-suggests --no-install-recommends && \ | ||
docker-php-ext-install -j$(nproc) xml && \ | ||
docker-php-ext-install -j$(nproc) zip && \ | ||
pecl install xdebug-${XDEBUG_VERSION} && docker-php-ext-enable xdebug && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get clean | ||
|
||
COPY .docker/php/conf.d/*.ini /usr/local/etc/php/conf.d/ | ||
|
||
# Memory limit | ||
RUN echo "memory_limit = 1G" >> /usr/local/etc/php/php.ini | ||
|
||
# Install composer | ||
RUN set -xe; \ | ||
curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin --version=${COMPOSER_VERSION} > /dev/null 2>&1 && \ | ||
chmod +x /usr/local/bin/composer | ||
|
||
WORKDIR /app | ||
|
||
COPY composer.* ./ | ||
|
||
RUN set -xe; \ | ||
composer install --no-autoloader --no-dev --no-interaction --no-progress --no-scripts --no-suggest --prefer-dist && \ | ||
composer clear-cache && \ | ||
rm -rf ./vendor/*/*/tests | ||
|
||
COPY ./ ./ | ||
RUN composer dump-autoload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[xdebug] | ||
zend_extension=xdebug.so | ||
|
||
xdebug.mode=coverage,debug | ||
xdebug.client_host=host.docker.internal | ||
xdebug.client_port=9003 | ||
xdebug.discover_client_host=true | ||
xdebug.start_with_request=yes | ||
xdebug.idekey=PHPSTORM | ||
xdebug.log_level=0 | ||
xdebug.log=/app/var/xdebug.log |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
services: | ||
php: | ||
build: | ||
context: . | ||
dockerfile: .docker/php/Dockerfile | ||
restart: on-failure | ||
ports: | ||
- "9003:9003" | ||
volumes: | ||
- ./:/app |
This file was deleted.
Oops, something went wrong.