-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (15 loc) · 701 Bytes
/
Dockerfile
File metadata and controls
20 lines (15 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Image PHP + Apache (HTTP + HTTPS avec certificats dans certs/)
FROM php:8.2-apache
# Activer mysqli pour la connexion MySQL
RUN docker-php-ext-install mysqli
# Activer mod_ssl, mod_rewrite (redirection HTTP→HTTPS), mod_headers (HSTS)
RUN a2enmod ssl rewrite headers \
&& rm -f /etc/apache2/sites-enabled/default-ssl.conf /etc/apache2/sites-enabled/000-default.conf
COPY docker/apache-ssl.conf /etc/apache2/sites-enabled/banking-ssl.conf
COPY docker/apache-http.conf /etc/apache2/sites-enabled/banking-http.conf
# DocumentRoot : contenu du dossier www
COPY www/ /var/www/html/
# Permissions pour Apache
RUN chown -R www-data:www-data /var/www/html
# HTTP (80) et HTTPS (443)
EXPOSE 80 443