Skip to content

Commit 50abb55

Browse files
Move Dockerfile, add mod deflate, filter & expires, add WORKDIR, add ServerName in apache2.conf
1 parent 3006d99 commit 50abb55

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docker/php/Dockerfile renamed to Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FROM php:7.4-apache
2+
WORKDIR /var/www/html
23

34
RUN apt-get update && apt-get install -y \
45
libfreetype6-dev \
@@ -13,11 +14,12 @@ RUN apt-get update && apt-get install -y \
1314
locales-all \
1415
&& docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \
1516
&& docker-php-ext-install -j$(nproc) gd pdo pdo_mysql zip mysqli intl
16-
RUN a2enmod rewrite
17+
RUN a2enmod rewrite && a2enmod deflate && a2enmod filter && a2enmod expires
1718

1819
# Locale
1920
ENV LC_ALL C.UTF-8
2021
ENV LANG C.UTF-8
2122

2223
# Restart apache
23-
RUN service apache2 restart
24+
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
25+
RUN service apache2 restart

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: '3'
33
services:
44
php:
55
build:
6-
context: './docker/php'
6+
context: '.'
77
ports:
88
- 80:80
99
volumes:

0 commit comments

Comments
 (0)