-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
78 lines (67 loc) · 1.7 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM php:7.2-apache
MAINTAINER Elmar Hinz <t3elmar@gmail.com>
# Load packages
RUN apt-get update; \
apt-get install -y --no-install-recommends \
graphicsmagick \
ghostscript \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libxml2-dev \
wget \
zlib1g-dev \
;
# Configure PHP and Apache
RUN docker-php-ext-configure intl
RUN docker-php-ext-configure gd \
--with-freetype-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/; \
--with-png-dir=/usr/include/; \
--with-zlib-dir=/usr/include/; \
docker-php-ext-install -j$(nproc) \
intl \
gd \
mysqli \
opcache \
soap \
zip \
; \
pecl install redis; \
pecl install xdebug; \
docker-php-ext-enable redis xdebug; \
a2enmod rewrite;
COPY typo3.ini /usr/local/etc/php/conf.d/
COPY xdebug.ini /usr/local/etc/php/conf.d/
# Setup directories
WORKDIR /var/www/html
RUN \
chmod 2770 /var/www/html; \
mkdir typo3_src; \
ln -s typo3_src/index.php; \
ln -s typo3_src/typo3; \
mkdir typo3temp; \
mkdir typo3conf; \
mkdir fileadmin; \
mkdir uploads; \
touch FIRST_INSTALL; \
chown -R www-data .;
# Configure mount points
VOLUME /var/www/html/typo3_src
VOLUME /var/www/html/fileadmin
VOLUME /var/www/html/typo3conf
VOLUME /var/www/html/typo3temp
VOLUME /var/www/html/uploads
# Cleanup
RUN apt-get -y purge \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng-dev \
libxml2-dev \
zlib1g-dev \
; \
apt-get autoremove -y; \
apt-get clean; \
rm -rf /var/lib/apt/lists/* /usr/src/*;