G
G
great_772020-01-06 02:43:16
Docker
great_77, 2020-01-06 02:43:16

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'

docker-compose.yml
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

web/Dockerfile
FROM php:7.2-apache

RUN docker-php-ext-install \
    pdo_mysql \
    && a2enmod \
    rewrite

There is also a database folder.
.env
#PATHS

DB_PATH_HOST=./databases

APP_PATH_HOST=./myproject

APP_PATH_CONTAINER=/var/www/html/

Is it possible to see what is wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
great_77, 2020-01-06
@great_77

We read and google the correct spelling of the word "
environment

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question