Primul container docker ce ruleaza un php simplu si un phpinfo in src (proiect)
This commit is contained in:
12
docker-compose.yml
Normal file
12
docker-compose.yml
Normal 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
4
docker/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
/vendor
|
||||||
|
/node_modules
|
||||||
|
.env
|
||||||
|
.DS_Store
|
||||||
10
docker/php/Dockerfile
Normal file
10
docker/php/Dockerfile
Normal 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
3
src/index.php
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<?php
|
||||||
|
phpinfo();
|
||||||
|
|
||||||
Reference in New Issue
Block a user