-
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 the value of
dockerfile_inline
of service php-fpm
with `p…
…hp-fpm-base` and passing args to prevent double escaping dockerfile variables in compose: docker/docs#18566 (comment) * move the value of env `PHP_INI_OPEN_BASEDIR` from `common.compose.yaml` to `php-fpm/compose.yaml` as `build.args` - remove all service-level key `depends_on: [php-fpm]` as it won't specify building order: docker/compose#8538 (comment) docker/compose#5228 (comment)
- Loading branch information
Showing
5 changed files
with
27 additions
and
31 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
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
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
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
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 |
---|---|---|
@@ -1,28 +1,14 @@ | ||
services: | ||
php-fpm-base: | ||
image: php-fpm-base | ||
build: # https://stackoverflow.com/questions/48874739/build-docker-image-that-depends-on-a-local-dockerfile/79166897#79166897 | ||
dockerfile: Dockerfile | ||
entrypoint: sh -c exit | ||
pull_policy: build | ||
php-fpm: | ||
extends: | ||
file: ../common.compose.yaml | ||
service: common | ||
depends_on: | ||
- php-fpm-base | ||
image: php-fpm | ||
# https://github.com/docker-library/php/blob/6b636b96c06be449514a5033037bf653d8a86967/8.3/bullseye/fpm/Dockerfile#L275 | ||
command: php-fpm | ||
ports: | ||
- $PHP_FPM_PORT:9000 | ||
build: | ||
dockerfile_inline: | | ||
# syntax=docker/dockerfile:1 | ||
FROM php-fpm-base | ||
ADD --chmod=0755 \ | ||
https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions \ | ||
/usr/local/bin | ||
RUN install-php-extensions $PHP_EXTENSIONS | ||
WORKDIR $WEB_ROOT | ||
args: | ||
PHP_INI_OPEN_BASEDIR: /tmp:$WEB_ROOT | ||
PHP_EXTENSIONS: $PHP_EXTENSIONS | ||
WEB_ROOT: $WEB_ROOT | ||
# https://github.com/docker-library/php/blob/6b636b96c06be449514a5033037bf653d8a86967/8.3/bullseye/fpm/Dockerfile#L275 | ||
command: php-fpm |