forked from Wonderfall/docker-nextcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.20
76 lines (68 loc) · 2.52 KB
/
Dockerfile.20
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
FROM ghcr.io/dron4eg/nginx-php:0.0.4
#
ARG NEXTCLOUD_VERSION=20.0.8
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
ENV UID=991 GID=991 \
UPLOAD_MAX_SIZE=10G \
APC_SHM_SIZE=128M \
OPCACHE_MEM_SIZE=128 \
MEMORY_LIMIT=512M \
CRON_PERIOD=5m \
CRON_MEMORY_LIMIT=1g \
TZ=Etc/UTC \
DB_TYPE=sqlite3 \
DOMAIN=localhost
RUN apk -U upgrade \
&& apk add -t build-dependencies \
gnupg \
tar \
build-base \
autoconf \
automake \
pcre-dev \
libtool \
samba-dev \
imagemagick-dev \
&& apk add \
libressl \
ca-certificates \
libsmbclient \
tzdata \
imagemagick \
ffmpeg \
&& pecl install \
smbclient \
apcu \
redis \
imagick \
&& echo "extension=smbclient.so" > /php/conf.d/smbclient.ini \
&& echo "extension=redis.so" > /php/conf.d/redis.ini \
&& echo "extension=imagick.so" > /php/conf.d/imagick.ini \
&& mkdir /nextcloud \
&& cd /tmp \
&& NEXTCLOUD_TARBALL="nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL} \
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.sha512 \
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.asc \
&& wget -q https://nextcloud.com/nextcloud.asc \
&& echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \
&& CHECKSUM_STATE=$(echo -n $(sha512sum -c ${NEXTCLOUD_TARBALL}.sha512) | tail -c 2) \
&& if [ "${CHECKSUM_STATE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \
&& gpg --import nextcloud.asc \
&& FINGERPRINT="$(LANG=C gpg --verify ${NEXTCLOUD_TARBALL}.asc ${NEXTCLOUD_TARBALL} 2>&1 \
| sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \
&& if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \
&& if [ "${FINGERPRINT}" != "${GPG_nextcloud}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \
&& echo "All seems good, now unpacking ${NEXTCLOUD_TARBALL}..." \
&& tar xjf ${NEXTCLOUD_TARBALL} --strip 1 -C /nextcloud \
&& update-ca-certificates \
&& apk del build-dependencies \
&& rm -rf /var/cache/apk/* /tmp/* /root/.gnupg
COPY rootfs /
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /data /config /apps2 /nextcloud/themes
EXPOSE 8888
LABEL description="A server software for creating file hosting services" \
nextcloud="Nextcloud v${NEXTCLOUD_VERSION}" \
maintainer="Wonderfall <[email protected]>"
CMD ["run.sh"]