Primul container docker ce ruleaza un php simplu si un phpinfo in src (proiect)

This commit is contained in:
2025-12-12 07:52:21 +00:00
parent 86e34d222a
commit 498b01ddd1
4 changed files with 29 additions and 0 deletions

12
docker-compose.yml Normal file
View File

@@ -0,0 +1,12 @@
version: "3.9"
services:
php:
build:
context: .
dockerfile: docker/php/Dockerfile
container_name: itschool-php84
volumes:
- ./src:/var/www/html
ports:
- "8080:80"

4
docker/.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
/vendor
/node_modules
.env
.DS_Store

10
docker/php/Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM php:8.4-apache
RUN apt-get update && apt-get install -y \
git \
unzip \
nano \
&& docker-php-ext-install pdo pdo_mysql \
&& a2enmod rewrite
WORKDIR /var/www/html

3
src/index.php Normal file
View File

@@ -0,0 +1,3 @@
<?php
phpinfo();