forked from goalgorilla/drupal_social
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
55 lines (40 loc) · 1.66 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
FROM drupal:8
MAINTAINER [email protected]
# Install packages.
RUN apt-get update && apt-get install -y \
php-pclzip \
mysql-client \
git \
ssmtp && \
apt-get clean
ADD docker_build/drupal8/mailcatcher-ssmtp.conf /etc/ssmtp/ssmtp.conf
# Dockerhub currently runs on docker 1.8 and does not support the ARG command.
# Reset the logic after the dockerhub is updated.
# https://docs.docker.com/v1.8/reference/builder/
# ARG hostname=goalgorilla.com
RUN echo "hostname=goalgorilla.com" >> /etc/ssmtp/ssmtp.conf
RUN echo 'sendmail_path = "/usr/sbin/ssmtp -t"' > /usr/local/etc/php/conf.d/mail.ini
ADD docker_build/drupal8/php.ini /usr/local/etc/php/php.ini
RUN docker-php-ext-install zip
# Install bcmath
RUN docker-php-ext-install bcmath
# Install Composer.
RUN curl -sS https://getcomposer.org/installer | php
RUN mv composer.phar /usr/local/bin/composer
# Install composer dependencies.
ADD docker_build/drupal8/composer.json /root/.composer/composer.json
ADD docker_build/drupal8/composer.lock /root/.composer/composer.lock
RUN composer global install --prefer-dist
# Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So:
RUN ln -s /root/.composer/vendor/bin/drush /usr/local/bin/drush
ADD public_html/ /var/www/html/
WORKDIR /var/www/html/
RUN chown -R www-data:www-data *
# Install Drupal console
RUN curl https://drupalconsole.com/installer -L -o drupal.phar
RUN mv drupal.phar /usr/local/bin/drupal
RUN chmod +x /usr/local/bin/drupal
RUN if [ ! -f /root/.composer/vendor/drush/drush/lib/Console_Table-1.1.3/Table.php ]; then pear install Console_Table; fi
RUN php -r 'opcache_reset();'
# Fix shell.
RUN echo "export TERM=xterm" >> ~/.bashrc