-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
58 lines (44 loc) · 1.61 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
FROM drupal:9.5-php8.0
MAINTAINER [email protected]
# Install packages.
RUN apt-get update && apt-get install -y \
zlib1g-dev \
libssl-dev \
libxml2-dev \
mariadb-client \
curl \
wget \
git \
msmtp \
libzip-dev \
nano \
p7zip-full \
vim && \
apt-get clean
ADD mailcatcher-msmtp.conf /etc/msmtprc
RUN echo 'sendmail_path = "/usr/bin/msmtp -t"' > /usr/local/etc/php/conf.d/mail.ini
ADD php.ini /usr/local/etc/php/php.ini
# Install extensions
RUN docker-php-ext-install zip bcmath exif sockets soap
# Install Composer.
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
mv composer.phar /usr/local/bin/composer && \
php -r "unlink('composer-setup.php');"
# Install Open Social via composer.
RUN rm -f /var/www/composer.lock
RUN rm -rf /root/.composer
ADD composer.json /var/www/composer.json
WORKDIR /var/www/
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist --no-interaction --no-dev
WORKDIR /var/www/html/
RUN chown -R www-data:www-data *
# Install Drush launcher.
RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.10.1/drush.phar && \
chmod +x drush.phar && \
mv drush.phar /usr/local/bin/drush
RUN php -r 'opcache_reset();'
# Fix shell.
RUN echo "export TERM=xterm" >> ~/.bashrc