-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (23 loc) · 1003 Bytes
/
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
FROM silintl/php8:8.1
ARG GITHUB_REF_NAME
ENV GITHUB_REF_NAME=$GITHUB_REF_NAME
ENV REFRESHED_AT 2024-02-27
RUN apt-get update -y && \
apt-get install -y make
WORKDIR /data
# Install/cleanup composer dependencies
COPY application/composer.json /data/
COPY application/composer.lock /data/
RUN composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader --no-progress
# It is expected that /data is = application/ in project folder
COPY application/ /data/
# 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 https://github.com/silinternational/config-shim/releases/download/v1.0.0/config-shim.gz config-shim.gz
RUN gzip -d config-shim.gz && chmod 755 config-shim && mv config-shim /usr/local/bin
EXPOSE 80
CMD ["/data/run.sh"]