69 lines
2.4 KiB
Docker
Raw Normal View History

FROM wonderfall/nginx-php
2016-11-25 18:19:08 +00:00
2017-04-25 14:10:27 +02:00
ARG NEXTCLOUD_VERSION=11.0.3
2016-11-25 18:19:08 +00:00
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 \
2017-03-22 15:44:07 +01:00
MEMORY_LIMIT=512M \
2016-11-25 18:19:08 +00:00
CRON_PERIOD=15m \
2017-02-15 15:12:09 +01:00
CRON_MEMORY_LIMIT=1g \
2016-11-25 18:19:08 +00:00
TZ=Etc/UTC \
DB_TYPE=sqlite3 \
2017-02-22 02:26:53 +01:00
DOMAIN=localhost
2016-11-25 18:19:08 +00:00
2017-04-25 14:10:27 +02:00
RUN BUILD_DEPS=" \
2016-11-25 18:19:08 +00:00
gnupg \
tar \
build-base \
autoconf \
automake \
2017-02-25 14:03:49 +01:00
pcre-dev \
2016-11-25 18:19:08 +00:00
libtool \
samba-dev" \
2017-02-15 17:36:36 +01:00
&& apk -U upgrade && apk add \
2016-11-25 18:19:08 +00:00
${BUILD_DEPS} \
libressl \
ca-certificates \
libsmbclient \
tzdata \
&& pecl install smbclient apcu redis \
&& echo "extension=smbclient.so" > /php/conf.d/smbclient.ini \
&& echo "extension=redis.so" > /php/conf.d/redis.ini \
2016-11-25 18:19:08 +00:00
&& mkdir /nextcloud \
&& cd /tmp \
2016-11-25 18:19:08 +00:00
&& NEXTCLOUD_TARBALL="nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
2016-12-13 22:32:00 +01:00
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL} \
2017-02-23 12:29:33 +01:00
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.sha512 \
2016-12-13 22:32:00 +01:00
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.asc \
2016-11-25 18:19:08 +00:00
&& wget -q https://nextcloud.com/nextcloud.asc \
&& echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \
2017-02-23 12:29:33 +01:00
&& CHECKSUM_STATE=$(echo -n $(sha512sum -c ${NEXTCLOUD_TARBALL}.sha512) | tail -c 2) \
2016-11-25 18:19:08 +00:00
&& 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 \
2017-04-30 23:49:33 +02:00
&& update-ca-certificates \
&& apk del ${BUILD_DEPS} \
2016-11-25 18:19:08 +00:00
&& rm -rf /var/cache/apk/* /tmp/* /root/.gnupg
COPY rootfs /
2016-11-25 18:19:08 +00:00
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
VOLUME /data /config /apps2 /nextcloud/themes
2016-11-25 18:19:08 +00:00
EXPOSE 8888
LABEL description="A server software for creating file hosting services" \
2017-01-19 02:31:59 +01:00
nextcloud="Nextcloud v${NEXTCLOUD_VERSION}" \
maintainer="Wonderfall <wonderfall@targaryen.house>"
2016-11-25 18:19:08 +00:00
CMD ["run.sh"]