Skip to content

Commit dc934e9

Browse files
committed
Add sample Docker config.
1 parent 534c490 commit dc934e9

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

server/php/Dockerfile

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM php:7.0-apache
2+
3+
# Enable the Apache Headers module:
4+
RUN ln -s /etc/apache2/mods-available/headers.load \
5+
/etc/apache2/mods-enabled/headers.load
6+
7+
# Enable the Apache Rewrite module:
8+
RUN ln -s /etc/apache2/mods-available/rewrite.load \
9+
/etc/apache2/mods-enabled/rewrite.load
10+
11+
# Install GD, Imagick and ImageMagick as image conversion options:
12+
RUN DEBIAN_FRONTEND=noninteractive \
13+
apt-get update && apt-get install -y --no-install-recommends \
14+
libpng-dev \
15+
libjpeg-dev \
16+
libmagickwand-dev \
17+
imagemagick \
18+
&& pecl install \
19+
imagick \
20+
&& docker-php-ext-enable \
21+
imagick \
22+
&& docker-php-ext-configure \
23+
gd --with-jpeg-dir=/usr/include/ \
24+
&& docker-php-ext-install \
25+
gd \
26+
# Uninstall obsolete packages:
27+
&& apt-get autoremove -y \
28+
libpng-dev \
29+
libjpeg-dev \
30+
libmagickwand-dev \
31+
# Remove obsolete files:
32+
&& apt-get clean \
33+
&& rm -rf \
34+
/tmp/* \
35+
/usr/share/doc/* \
36+
/var/cache/* \
37+
/var/lib/apt/lists/* \
38+
/var/tmp/*

server/php/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apache:
2+
build: ./
3+
ports:
4+
- "80:80"
5+
volumes:
6+
- "../../:/var/www/html"

0 commit comments

Comments
 (0)