Answer the question
In order to leave comments, you need to log in
Unsupported config option When creating an image, how to decide?
Errors:
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.db: 'enviroment'
Unsupported config option for services.web: 'enviroment'
version: '3'
services:
web:
build: ./web
enviroment:
- APACHE_RUN_USER=www-data
volumes:
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
ports:
- 8080:80
working_dir: ${APP_PATH_CONTAINER}
db:
image: mariadb
restart: always
enviroment:
MYSQL_ROOT_PASSWORD: 123456
volumes:
- ${DB_PATH_HOST}:/var/lib/mysql
adminer:
image: adminer
restart: always
ports:
- 8080:8080
composer:
image: composer:1.6
volumes:
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
working_dir: ${APP_PATH_CONTAINER}
command: composer install
FROM php:7.2-apache
RUN docker-php-ext-install \
pdo_mysql \
&& a2enmod \
rewrite
#PATHS
DB_PATH_HOST=./databases
APP_PATH_HOST=./myproject
APP_PATH_CONTAINER=/var/www/html/
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question