forked from beevelop/docker-directus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (33 loc) · 1.28 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
FROM php:apache
MAINTAINER Maik Hummel <[email protected]>
WORKDIR /var/www/html
COPY init.sh /opt/
ENV ADMIN_EMAIL=admin@localhost \
SITE_NAME=Directus \
ADMIN_PASSWORD=Un1c0rn \
DIRECTUS_VERSION=build
RUN apt-get update && apt-get install -yq git \
libfreetype6-dev \
libjpeg62-turbo-dev \
libmcrypt-dev \
libpng12-dev \
netcat && \
apt-get install -yq libmagickwand-dev --no-install-recommends && \
docker-php-ext-install iconv mcrypt && \
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && \
docker-php-ext-install gd mysqli pdo pdo_mysql && \
pecl install imagick-beta && \
docker-php-ext-enable imagick && \
curl -sL "https://api.github.com/repos/directus/directus/tarball/${DIRECTUS_VERSION}" | tar xz -C . --strip-components=1 && \
cd api && curl -sL 'https://getcomposer.org/installer' | php && \
php composer.phar install --no-dev --no-progress --prefer-dist && \
mkdir -p /var/www/html/media && \
# chown -R www-data:www-data /var/www/html && \
a2enmod rewrite && \
chmod +x /opt/init.sh && \
# clean up
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get autoremove -y && \
apt-get clean
EXPOSE 80
CMD /opt/init.sh