forked from govcms-extras/govcms-ops-d10
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.govcms
40 lines (30 loc) · 1.43 KB
/
Dockerfile.govcms
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
FROM drupal:10-php8.1
# Set timezone to Australia/Sydney by default
RUN ln -sf /usr/share/zoneinfo/Australia/Sydney /etc/localtime
RUN apt-get update && \
apt-get install -q -y libicu-dev sqlite3 mariadb-client ssmtp mailutils git unzip rsync nano && \
apt-get autoclean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* && \
docker-php-ext-configure intl && \
docker-php-ext-install intl
RUN echo "memory_limit = 512M" >> /usr/local/etc/php/conf.d/docker-php-ram-limit.ini && \
echo "upload_max_filesize = 100M" >> /usr/local/etc/php/conf.d/docker-php-upload-limit.ini && \
echo "post_max_size = 100M" >> /usr/local/etc/php/conf.d/docker-php-upload-limit.ini
ENV COMPOSER_ALLOW_SUPERUSER=1
ENV COMPOSER_MEMORY_LIMIT=-1
ENV SIMPLETEST_BASE_URL="http://localhost"
ENV SIMPLETEST_DB='mysql://drupal:drupal@mariadb/drupal'
WORKDIR /app
COPY ./composer.json /app/
RUN --mount=type=secret,id=github_token,dst=/app/auth.json composer update
RUN set -eux; \
chown -R www-data:www-data web/sites web/modules web/themes; \
rm -rf /opt/drupal; \
ln -sf /app/web /var/www/html; \
rm -rf /app/web/profiles/govcms/config; \
sed -i -e "/core_version_requirement/ s!9!10!" /app/web/profiles/govcms/govcms.info.yml; \
sed -i -e "132, 146d" /app/web/profiles/govcms/govcms.install;
COPY ./sites/govcms/config /app/web/profiles/govcms/config
COPY ./modules/govcms /app/web/modules/govcms
ENV PATH=${PATH}:/app/bin