-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathDockerfile
More file actions
83 lines (70 loc) · 1.77 KB
/
Copy pathDockerfile
File metadata and controls
83 lines (70 loc) · 1.77 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
ARG ubuntu=24.04
FROM ubuntu:${ubuntu}
LABEL org.opencontainers.image.authors="Montala Ltd"
ENV DEBIAN_FRONTEND="noninteractive"
ARG php=8.3
ARG TARGETARCH
RUN --mount=type=cache,id=ubuntu-${TARGETARCH},target=/var/lib/apt/lists,sharing=locked <<EOI
set -e
apt-get update
apt-get install -y \
nano \
apache2 \
subversion \
ghostscript \
antiword \
poppler-utils \
libimage-exiftool-perl \
cron \
postfix \
wget \
php${php} \
php${php}-apcu \
php${php}-curl \
php${php}-dev \
php${php}-gd \
php${php}-intl \
php${php}-ldap \
php${php}-mysqlnd \
php${php}-mbstring \
php${php}-zip \
libapache2-mod-php \
libopencv-dev \
python3-opencv \
python3 \
python3-pip
apt-get install -y --no-install-recommends \
ffmpeg \
imagemagick
apt-get clean
EOI
RUN <<EOI
set -e
sed -i -e "s/upload_max_filesize\s*=\s*2M/upload_max_filesize = 100M/g" /etc/php/${php}/apache2/php.ini
sed -i -e "s/post_max_size\s*=\s*8M/post_max_size = 100M/g" /etc/php/${php}/apache2/php.ini
sed -i -e "s/max_execution_time\s*=\s*30/max_execution_time = 300/g" /etc/php/${php}/apache2/php.ini
sed -i -e "s/memory_limit\s*=\s*128M/memory_limit = 1G/g" /etc/php/${php}/apache2/php.ini
EOI
RUN bash <<EOI
set -e
(
echo '<Directory /var/www/>'
echo -e '\tOptions FollowSymLinks'
echo '</Directory>'
) >>/etc/apache2/sites-enabled/000-default.conf
EOI
ADD cronjob /etc/cron.daily/resourcespace
WORKDIR /var/www/html
RUN <<EOI
set -e
rm -f index.html
svn co -q https://svn.resourcespace.com/svn/rs/releases/10.7 .
mkdir -p filestore
chmod 777 filestore
chmod -R 777 include/
EOI
# Copy custom entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Start both cron and Apache
CMD ["/entrypoint.sh"]