2016-07-30 18:57:58 +02:00
|
|
|
FROM alpine:3.4
|
2016-04-30 12:57:18 +02:00
|
|
|
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
|
2016-04-11 15:59:32 +02:00
|
|
|
|
2016-07-20 03:45:05 +02:00
|
|
|
ARG NEXTCLOUD_VERSION=9.0.53
|
2016-06-16 12:54:04 +02:00
|
|
|
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
2016-04-30 19:00:33 +02:00
|
|
|
|
2016-04-30 12:57:18 +02:00
|
|
|
ENV GID=991 UID=991
|
2016-04-11 16:06:13 +02:00
|
|
|
|
2016-06-30 13:15:04 +02:00
|
|
|
RUN echo "@commuedge https://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
|
|
|
|
&& echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
2016-07-01 12:11:22 +02:00
|
|
|
&& BUILD_DEPS="gnupg tar" \
|
2016-04-30 12:57:18 +02:00
|
|
|
&& apk -U add \
|
2016-06-26 20:05:38 +02:00
|
|
|
${BUILD_DEPS} \
|
2016-04-11 15:59:32 +02:00
|
|
|
nginx \
|
|
|
|
supervisor \
|
2016-04-30 12:57:18 +02:00
|
|
|
openssl \
|
2016-07-01 12:11:22 +02:00
|
|
|
ca-certificates \
|
2016-07-30 19:26:07 +02:00
|
|
|
libsmbclient \
|
2016-04-30 12:57:18 +02:00
|
|
|
tini@commuedge \
|
|
|
|
php7@testing \
|
|
|
|
php7-fpm@testing \
|
|
|
|
php7-intl@testing \
|
2016-05-11 20:08:27 +02:00
|
|
|
php7-mbstring@testing \
|
2016-04-30 12:57:18 +02:00
|
|
|
php7-curl@testing \
|
|
|
|
php7-gd@testing \
|
|
|
|
php7-mcrypt@testing \
|
|
|
|
php7-opcache@testing \
|
|
|
|
php7-json@testing \
|
|
|
|
php7-session@testing \
|
|
|
|
php7-pdo@testing \
|
|
|
|
php7-dom@testing \
|
|
|
|
php7-ctype@testing \
|
|
|
|
php7-iconv@testing \
|
|
|
|
php7-pdo_mysql@testing \
|
2016-07-27 17:17:30 +02:00
|
|
|
php7-pdo_pgsql@testing \
|
2016-07-30 18:57:58 +02:00
|
|
|
php7-pgsql@testing \
|
2016-07-30 19:49:43 +02:00
|
|
|
php7-pdo_sqlite@testing \
|
2016-08-06 10:00:53 +02:00
|
|
|
php7-sqlite3@testing \
|
2016-04-30 12:57:18 +02:00
|
|
|
php7-zlib@testing \
|
|
|
|
php7-zip@testing \
|
|
|
|
php7-xmlreader@testing \
|
2016-04-30 13:28:54 +02:00
|
|
|
php7-posix@testing \
|
2016-04-30 13:55:13 +02:00
|
|
|
php7-openssl@testing \
|
2016-06-30 16:12:14 +02:00
|
|
|
php7-ldap@testing \
|
2016-07-30 19:26:07 +02:00
|
|
|
php7-ftp@testing \
|
2016-06-26 20:05:38 +02:00
|
|
|
php7-apcu@testing \
|
2016-07-30 19:26:07 +02:00
|
|
|
php7-redis@testing \
|
2016-06-16 12:54:04 +02:00
|
|
|
&& 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}.sha256 \
|
|
|
|
&& wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.asc \
|
2016-06-26 20:05:38 +02:00
|
|
|
&& wget -q https://nextcloud.com/nextcloud.asc \
|
2016-06-16 12:54:04 +02:00
|
|
|
&& echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \
|
|
|
|
&& CHECKSUM_STATE=$(echo -n $(sha256sum -c ${NEXTCLOUD_TARBALL}.sha256) | tail -c 2) \
|
2016-05-08 21:48:15 +02:00
|
|
|
&& if [ "${CHECKSUM_STATE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \
|
2016-06-16 12:54:04 +02:00
|
|
|
&& gpg --import nextcloud.asc \
|
|
|
|
&& FINGERPRINT="$(LANG=C gpg --verify ${NEXTCLOUD_TARBALL}.asc ${NEXTCLOUD_TARBALL} 2>&1 \
|
2016-05-08 21:48:15 +02:00
|
|
|
| sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \
|
|
|
|
&& if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \
|
2016-06-16 12:54:04 +02:00
|
|
|
&& 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 \
|
2016-06-26 20:05:38 +02:00
|
|
|
&& apk del ${BUILD_DEPS} \
|
2016-05-30 19:43:23 +02:00
|
|
|
&& rm -rf /var/cache/apk/* /tmp/* /root/.gnupg
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
2016-04-30 12:57:18 +02:00
|
|
|
COPY php-fpm.conf /etc/php7/php-fpm.conf
|
|
|
|
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
|
2016-07-01 12:11:22 +02:00
|
|
|
COPY apcu.ini /etc/php7/conf.d/apcu.ini
|
2016-04-30 19:06:12 +02:00
|
|
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
2016-04-11 15:59:32 +02:00
|
|
|
COPY run.sh /usr/local/bin/run.sh
|
2016-06-16 12:54:04 +02:00
|
|
|
COPY cron /etc/periodic/15min/nextcloud
|
2016-04-11 15:59:32 +02:00
|
|
|
|
2016-06-16 12:54:04 +02:00
|
|
|
RUN chmod +x /usr/local/bin/run.sh /etc/periodic/15min/nextcloud
|
2016-04-11 15:59:32 +02:00
|
|
|
|
|
|
|
VOLUME /data /config /apps2
|
2016-06-26 20:05:38 +02:00
|
|
|
|
2016-04-11 15:59:32 +02:00
|
|
|
EXPOSE 80
|
|
|
|
|
|
|
|
LABEL description="A server software for creating file hosting services" \
|
2016-06-26 20:05:38 +02:00
|
|
|
nextcloud="Nextcloud v${NEXTCLOUD_VERSION}"
|
2016-04-11 15:59:32 +02:00
|
|
|
|
2016-05-09 18:46:01 +02:00
|
|
|
CMD ["/sbin/tini","--","run.sh"]
|