-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.cli
44 lines (34 loc) · 1.69 KB
/
Dockerfile.cli
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
FROM quay.io/centos/centos:stream
ENV DB_NAME "bootstrap"
ENV DB_USERNAME "bootstrap"
ENV DB_PASSWORD "dev"
ENV GIT_CLONE_PATH "/var/www/drupal-bootstrap.org-repositories"
USER 0
WORKDIR /opt/app-root/src
# Copy site code
COPY . .
RUN dnf upgrade -y && dnf module enable -y php:7.4 && \
dnf install -y php php-mysqlnd php-pgsql php-bcmath \
php-gd php-intl php-json php-ldap php-mbstring php-pdo \
php-process php-soap php-opcache php-xml \
php-gmp php-pecl-apcu php-zip mysql wget git strace && \
dnf clean all
RUN echo 'memory_limit = 500M' >> /etc/php.ini && \
curl -o /tmp/composer-setup.php https://getcomposer.org/installer \
&& curl -o /tmp/composer-setup.sig https://composer.github.io/installer.sig \
&& php -r "if (hash('SHA384', file_get_contents('/tmp/composer-setup.php')) !== trim(file_get_contents('/tmp/composer-setup.sig'))) { unlink('/tmp/composer-setup.php'); echo 'Invalid installer' . PHP_EOL; exit(1); }" \
&& php /tmp/composer-setup.php --filename composer --install-dir /usr/local/bin
RUN composer install && \
wget https://github.com/drush-ops/drush/releases/download/8.1.18/drush.phar -O /usr/local/bin/drush && \
chmod +x /usr/local/bin/drush && \
mkdir -p /var/www/drupal-bootstrap.org-repositories && \
chown -R 1001:0 /var/www/drupal-bootstrap.org-repositories && \
chmod -R 770 /var/www/drupal-bootstrap.org-repositories
COPY conf/settings.local.php web/sites/default/settings.local.php
RUN { \
echo "if (file_exists(__DIR__ . '/settings.local.php')) {"; \
echo " include_once __DIR__ . '/settings.local.php';"; \
echo "}"; \
} >> web/sites/default/settings.php
USER 1001
CMD sleep infinity