I am learning Docker. My docker-compose.yml file is like below.
version: '3.8'
services:
php56:
build:
context: .
dockerfile: Dockerfile.56
ports:
- 88:80
volumes:
- ./php56:/var/www/html/
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
volumes:
- ./volumes/mysql:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password #example of a password
phpmyadmin:
image: phpmyadmin
restart: always
ports:
- 8080:80
My Docker.56 file is like below
FROM php:5.6-apache
RUN docker-php-ext-install mysqli
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
I am getting error like below
ERROR: The Compose file './docker-compose.yml' is invalid because:
Unsupported config option for services.db: 'MYSQL_ROOT_PASSWORD'
Unsupported config option for services.php56: 'context'
services.php56.build contains an invalid type, it should be a string, or an object
services.db.environment contains an invalid type, it should be an object, or an array