-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (28 loc) · 989 Bytes
/
Dockerfile
File metadata and controls
38 lines (28 loc) · 989 Bytes
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
FROM ghcr.io/sil-org/php8:8.3
ARG GITHUB_REF_NAME
ENV GITHUB_REF_NAME=$GITHUB_REF_NAME
RUN apt-get update && apt-get install -y --no-install-recommends \
cron \
make \
ssl-cert \
&& rm -rf /var/lib/apt/lists/* \
&& a2enmod ssl
ENV APP_HOME=/app
WORKDIR $APP_HOME
# Install/cleanup composer dependencies
COPY app/composer.json $APP_HOME
COPY app/composer.lock $APP_HOME
RUN composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader --no-progress
COPY app/ $APP_HOME
# Fix folder permissions
RUN chown -R www-data:www-data \
console/runtime/
COPY dockerbuild/vhost.conf /etc/apache2/sites-enabled/
# ErrorLog inside a VirtualHost block is ineffective for unknown reasons
RUN sed -i -E 's@ErrorLog .*@ErrorLog /proc/self/fd/2@i' /etc/apache2/apache2.conf
# Add links to the run scripts to maintain backward compatibility
RUN mkdir /data
RUN ln -s /app/run.sh /data/run.sh
RUN ln -s /app/run-cron.sh /data/run-cron.sh
EXPOSE 80
CMD ["/app/run.sh"]