-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.template
63 lines (50 loc) · 2.11 KB
/
Dockerfile.template
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
FROM php:%%STUDIP_PHP_VERSION%%-apache
LABEL maintainer "Christopher Perrin <[email protected]>"
ENV STUDIP_VERSION=%%STUDIP_VERSION%%
ENV STUDIP_DOWNLOAD_URL="%%STUDIP_DOWNLOAD_URL%%" \
STUDIP_ARCHIVE_NAME="studip-$STUDIP_VERSION.tar.bz" \
STUDIP_ARCHIVE_HASH_SHA1="%%STUDIP_ARCHIVE_HASH_SHA1%%" \
STUDIP_DIR_NAME="$STUDIP_VERSION"
RUN apt-get update && \
apt-get install --yes wget \
lbzip2 \
zip \
unzip \
libssl-dev \
libcurl4-openssl-dev \
libxml2-dev \
libldap2-dev \
libldb-dev \
mysql-client && \
apt-get clean && \
rm --recursive /var/lib/apt/lists/*
RUN ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so && \
docker-php-ext-install pdo_mysql \
mysqli \
gettext \
ftp \
curl \
bcmath \
xml \
ldap \
dom
RUN cd /tmp && \
wget "$STUDIP_DOWNLOAD_URL" -O "$STUDIP_ARCHIVE_NAME" && \
if [ -n "$STUDIP_ARCHIVE_HASH_SHA1" ]; then \
echo "$STUDIP_ARCHIVE_HASH_SHA1 $STUDIP_ARCHIVE_NAME" | sha1sum --check; \
fi && \
tar --extract --file "$STUDIP_ARCHIVE_NAME" && \
rm "$STUDIP_ARCHIVE_NAME" && \
mv "$STUDIP_DIR_NAME" /usr/local/studip
RUN ln -s /usr/local/studip/public /var/www/html/studip && \
mv /usr/local/studip/config/config_local.inc.php.dist /usr/local/studip/config/config_local.inc.php && \
mv /usr/local/studip/config/config.inc.php.dist /usr/local/studip/config/config.inc.php && \
chown --recursive www-data:www-data /usr/local/studip/public \
/usr/local/studip/data && \
chmod a+rwx /tmp
ADD entrypoint /usr/local/bin
RUN chmod a+x /usr/local/bin/entrypoint
ADD php.ini /usr/local/etc/php
ENTRYPOINT ["entrypoint"]
EXPOSE 80
CMD ["apache2-foreground"]