-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
56 lines (41 loc) · 1.64 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM silintl/php8:8.1
LABEL maintainer="[email protected]"
RUN apt-get update -y && \
apt-get install -y \
# Needed to install s3cmd
python3-pip && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
RUN curl https://raw.githubusercontent.com/silinternational/runny/0.2/runny -o /usr/local/bin/runny
RUN chmod a+x /usr/local/bin/runny
# Copy in vhost configuration
COPY build/vhost.conf /etc/apache2/sites-enabled/
# Ensure the DocumentRoot folder exists
RUN mkdir -p /data/public/
# Make sure the Apache config is valid
RUN ["apache2ctl", "configtest"]
# Put in place the script to be used by child Docker images to install Composer
# dependencies.
COPY build/install-deps-and-ssp-overrides.sh /tmp
RUN chmod +x /tmp/install-deps-and-ssp-overrides.sh
# Copy in any additional PHP ini files
COPY build/php/*.ini "$PHP_INI_DIR/conf.d/"
# get s3cmd and s3-expand
RUN pip install s3cmd
RUN curl https://raw.githubusercontent.com/silinternational/s3-expand/1.5/s3-expand -o /usr/local/bin/s3-expand
RUN chmod a+x /usr/local/bin/s3-expand
# It is expected that /data is = application/ in project folder
COPY application/ /data/
WORKDIR /data
# Fix folder permissions
RUN chown -R www-data:www-data \
protected/runtime/ \
public/assets/
# Get s3-expand for ENTRYPOINT
RUN curl -o /usr/local/bin/s3-expand https://raw.githubusercontent.com/silinternational/s3-expand/master/s3-expand \
&& chmod a+x /usr/local/bin/s3-expand
EXPOSE 80
ENTRYPOINT ["/usr/local/bin/s3-expand"]
# Record now as the build date/time (in a friendly format).
RUN date -u +"%B %-d, %Y, %-I:%M%P (%Z)" > /data/protected/data/version.txt
CMD ["/data/run.sh"]