-
Notifications
You must be signed in to change notification settings - Fork 70
/
Dockerfile
88 lines (82 loc) · 3.01 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
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
84
85
86
87
88
FROM docker.io/php:8.0-fpm
LABEL maintainer="markus@martialblog.de"
# Install OS dependencies
RUN set -ex; \
apt-get update; \
apt-get install -y --no-install-recommends \
netcat \
; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
# Install PHP Plugins and Configure PHP imap plugin
# hadolint ignore=SC2086
RUN set -ex; \
\
savedAptMark="$(apt-mark showmanual)"; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
libldap2-dev \
libfreetype6-dev \
libjpeg-dev \
libonig-dev \
zlib1g-dev \
libc-client-dev \
libkrb5-dev \
libpng-dev \
libpq-dev \
libzip-dev \
libtidy-dev \
libsodium-dev \
; \
\
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
docker-php-ext-install -j "$(nproc)" \
exif \
gd \
imap \
ldap \
mbstring \
pdo \
pdo_mysql \
pdo_pgsql \
pgsql \
sodium \
tidy \
zip \
; \
\
# Reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
| awk '/=>/ { print $3 }' \
| sort -u \
| xargs -r dpkg-query -S \
| cut -d: -f1 \
| sort -u \
| xargs -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
ARG version="3.28.59+230517"
ARG sha256_checksum="e048eaaf5260a8d6391609c355bb4df8c8ef0e0943b2d612d2a8414956db622a"
ARG archive_url="https://github.com/LimeSurvey/LimeSurvey/archive/${version}.tar.gz"
ENV LIMESURVEY_VERSION=$version
# Download, unzip and chmod LimeSurvey from GitHub (defaults to the official LimeSurvey/LimeSurvey repository)
RUN set -ex; \
curl -sSL "${archive_url}" --output /tmp/limesurvey.tar.gz && \
echo "${sha256_checksum} /tmp/limesurvey.tar.gz" | sha256sum -c - && \
\
tar xzvf "/tmp/limesurvey.tar.gz" --strip-components=1 -C /var/www/html/ && \
rm -f "/tmp/limesurvey.tar.gz" && \
chown -R www-data:www-data /var/www/html
EXPOSE 9000
WORKDIR /var/www/html
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["php-fpm"]