Hello i’m planning to build a website for a friend!
And in this project, i need php/mysql
I have already built the docker-compose and a DockerFile for commands
docker-compose :
version : ‘3.8’
services:
php:
image: php:8.2-apache
container-name: php
ports:
- 8000:80
volumes:
- ./php:/var/www/html
build:
context: .
dockerfile: DockerFile />
And the DockerFile :
FROM php:8.2-apache
RUN apt-get update && apt-get upgrade -y
RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable mysqli pdo_mysql
EXPOSE 80
It’s not pulling so i guess my file version isn’t 3.8
But can’t find my Docker-compose version and 3.8 isn’t for Docker version 24.0.6
It’s not displayed in the compatibilty matrix !
Anyone can help me ? ^^
This is the error :
validating C:\Users.…\docker-compose.yml: services.php Additional property container-name is not allowed