Я пытаюсь развернуть приложение на graphQL, для этого я хочу установить расширение docker-php-ext-install
, но при выполнении команды docker-compose build
- получаю ошибку:
executor failed running [/bin/sh -c docker-php-ext-install pdo_mysql && a2enmod rewrite && webonyx/graphql-php]: exit code: 127
ERROR: Service 'web' failed to build : Build failed
Вот мой docker-compose.yml
version: '3'
services:
#web services (php and extentions)
web:
# path to Dockerfile for web
build: ./web
# for rights in apache
environment:
- APACHE_RUN_USER=#1000
volumes:
# path to application on local machine : path to application in container
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
ports:
- 8080:80
# app files in container is here
working_dir: ${APP_PATH_CONTAINER}
# databases
db:
image: mariadb
# restart container if an error occurs
restart: always
# sync db on local machine and in container
volumes:
- ${DB_PATH_HOST}:/var/lib/mysql
# mysql password for root user
environment:
MYSQL_ROOT_PASSWORD: 123456
# adminer for control database
adminer:
image: adminer
# restart container if an error occurs
restart: always
ports:
- 6080:8080
# install composer
composer:
image: composer:2.2
volumes:
# to composer has access to the app files
- ${APP_PATH_HOST}/server:${APP_PATH_CONTAINER}/server
# workdir where scripts run
working_dir: ${APP_PATH_CONTAINER}/server
# install composer dependencies
command: composer install
А вот содержание web:
FROM php:8.1-apache
RUN docker-php-ext-install \
# extension for mysql pdo
pdo_mysql \
# for laravel work
&& a2enmod \
rewrite \
docker-php-ext-install webonyx/graphql-php
rewrite
иdocker-php-ext-install webonyx/graphql-php
должно быть&&
т.к. это разные команды или вообще объединить две командыdocker-php-ext-install
в одну