-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
34 lines (24 loc) · 890 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
RUN apt-get update -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
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/ \
frontend/runtime/ \
frontend/web/assets/
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
RUN touch /etc/default/locale
EXPOSE 80
CMD ["/data/run.sh"]