2016-10-12 10:32:58 +02:00
|
|
|
FROM alpine:edge
|
2016-07-01 12:11:22 +02:00
|
|
|
|
2017-02-15 17:59:45 +01:00
|
|
|
ARG GNU_LIBICONV_VERSION=1.15
|
2017-02-15 17:36:36 +01:00
|
|
|
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
2016-09-22 17:04:31 +02:00
|
|
|
|
2016-09-19 12:59:09 +02:00
|
|
|
ENV UID=991 GID=991 \
|
2016-09-19 13:14:53 +02:00
|
|
|
UPLOAD_MAX_SIZE=10G \
|
|
|
|
APC_SHM_SIZE=128M \
|
2016-09-23 00:50:39 +02:00
|
|
|
OPCACHE_MEM_SIZE=128 \
|
2016-10-12 10:32:58 +02:00
|
|
|
CRON_PERIOD=15m \
|
2017-02-15 17:36:36 +01:00
|
|
|
CRON_MEMORY_LIMIT=1g \
|
2016-10-12 13:54:55 +02:00
|
|
|
TZ=Etc/UTC \
|
2016-10-12 10:32:58 +02:00
|
|
|
DB_TYPE=sqlite3 \
|
2017-02-22 02:39:04 +01:00
|
|
|
DOMAIN=localhost
|
2016-07-01 12:11:22 +02:00
|
|
|
|
2017-02-22 02:39:04 +01:00
|
|
|
RUN echo "@testing https://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
2016-09-22 17:04:31 +02:00
|
|
|
&& BUILD_DEPS=" \
|
2017-02-15 17:36:36 +01:00
|
|
|
gnupg \
|
2016-09-22 17:04:31 +02:00
|
|
|
tar \
|
|
|
|
build-base \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
2017-02-25 14:03:49 +01:00
|
|
|
pcre-dev \
|
2016-11-13 14:03:27 +00:00
|
|
|
libtool \
|
|
|
|
samba-dev" \
|
2017-02-15 17:36:36 +01:00
|
|
|
&& apk -U upgrade && apk add \
|
2016-07-01 12:11:22 +02:00
|
|
|
${BUILD_DEPS} \
|
|
|
|
nginx \
|
2016-09-16 17:08:06 +02:00
|
|
|
s6 \
|
2016-10-13 01:15:40 +02:00
|
|
|
libressl \
|
2016-07-01 12:11:22 +02:00
|
|
|
ca-certificates \
|
2016-07-30 19:26:07 +02:00
|
|
|
libsmbclient \
|
2016-08-27 20:49:35 +02:00
|
|
|
samba-client \
|
2016-08-27 21:31:49 +02:00
|
|
|
su-exec \
|
2016-10-12 13:54:55 +02:00
|
|
|
tzdata \
|
2017-02-15 17:36:36 +01:00
|
|
|
php7.1@testing \
|
|
|
|
php7.1-fpm@testing \
|
|
|
|
php7.1-intl@testing \
|
|
|
|
php7.1-mbstring@testing \
|
|
|
|
php7.1-curl@testing \
|
|
|
|
php7.1-gd@testing \
|
|
|
|
php7.1-mcrypt@testing \
|
|
|
|
php7.1-opcache@testing \
|
|
|
|
php7.1-json@testing \
|
|
|
|
php7.1-session@testing \
|
|
|
|
php7.1-pdo@testing \
|
|
|
|
php7.1-dom@testing \
|
|
|
|
php7.1-ctype@testing \
|
|
|
|
php7.1-pdo_mysql@testing \
|
|
|
|
php7.1-pdo_pgsql@testing \
|
|
|
|
php7.1-pgsql@testing \
|
|
|
|
php7.1-pdo_sqlite@testing \
|
|
|
|
php7.1-sqlite3@testing \
|
|
|
|
php7.1-zlib@testing \
|
|
|
|
php7.1-zip@testing \
|
|
|
|
php7.1-xmlreader@testing \
|
|
|
|
php7.1-xml@testing \
|
|
|
|
php7.1-xmlwriter@testing \
|
|
|
|
php7.1-posix@testing \
|
|
|
|
php7.1-openssl@testing \
|
|
|
|
php7.1-ldap@testing \
|
|
|
|
php7.1-ftp@testing \
|
|
|
|
php7.1-pcntl@testing \
|
|
|
|
php7.1-exif@testing \
|
|
|
|
php7.1-pear@testing \
|
|
|
|
php7.1-dev@testing \
|
2017-02-23 14:12:38 +01:00
|
|
|
&& pecl install smbclient apcu redis \
|
2016-11-13 14:03:27 +00:00
|
|
|
&& cd /tmp && wget -q http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${GNU_LIBICONV_VERSION}.tar.gz \
|
2016-09-22 17:04:31 +02:00
|
|
|
&& tar xzf libiconv-${GNU_LIBICONV_VERSION}.tar.gz && cd libiconv-${GNU_LIBICONV_VERSION} \
|
|
|
|
&& ./configure --prefix=/usr/local \
|
|
|
|
&& make && make install && libtool --finish /usr/local/lib && cd /tmp \
|
2017-02-15 17:36:36 +01:00
|
|
|
&& wget -q http://is1.php.net/get/php-7.1.1.tar.gz/from/this/mirror -O php7.1.tar.gz \
|
|
|
|
&& tar xzf php7.1.tar.gz && cd /tmp/php-7.1.1/ext/iconv && phpize7.1 \
|
|
|
|
&& ./configure --with-iconv=/usr/local --with-php-config=/usr/bin/php-config7.1 \
|
|
|
|
&& make && cp modules/iconv.so /usr/lib/php7.1/modules && cd /tmp \
|
|
|
|
&& echo "extension=iconv.so" > /etc/php7.1/conf.d/00_iconv.ini \
|
|
|
|
&& echo "extension=smbclient.so" > /etc/php7.1/conf.d/00_smbclient.ini \
|
2017-02-18 17:04:09 +01:00
|
|
|
&& echo "extension=redis.so" > /etc/php7.1/conf.d/redis.ini \
|
2017-02-22 20:22:57 +01:00
|
|
|
&& sed -i 's|;session.save_path = "/tmp"|session.save_path = "/data/session"|g' /etc/php7.1/php.ini \
|
2016-11-13 14:03:27 +00:00
|
|
|
&& mkdir /nextcloud \
|
2016-07-01 12:11:22 +02:00
|
|
|
&& wget -q https://download.nextcloud.com/server/daily/latest.tar.bz2 \
|
2017-02-23 12:54:27 +01:00
|
|
|
&& echo "Verifying checksum of latest.tar.bz2..." \
|
|
|
|
&& wget -q https://download.nextcloud.com/server/daily/latest.tar.bz2.sha512 \
|
|
|
|
&& echo "$(cat latest.tar.bz2.sha512 | awk '{print $1;}') latest.tar.bz2" > latest.tar.bz2.sha512 \
|
|
|
|
&& CHECKSUM_STATE=$(echo -n $(sha512sum -c latest.tar.bz2.sha512) | tail -c 2) \
|
2017-02-23 12:29:33 +01:00
|
|
|
&& if [ "${CHECKSUM_STATE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \
|
2016-07-01 12:11:22 +02:00
|
|
|
&& tar xjf latest.tar.bz2 --strip 1 -C /nextcloud \
|
2017-02-15 17:36:36 +01:00
|
|
|
&& apk del ${BUILD_DEPS} php7.1-pear php7.1-dev \
|
|
|
|
&& rm -rf /var/cache/apk/* /tmp/* /root/.gnupg
|
2016-07-01 12:11:22 +02:00
|
|
|
|
|
|
|
COPY nginx.conf /etc/nginx/nginx.conf
|
2017-02-15 17:36:36 +01:00
|
|
|
COPY php-fpm.conf /etc/php7.1/php-fpm.conf
|
|
|
|
COPY opcache.ini /etc/php7.1/conf.d/00_opcache.ini
|
|
|
|
COPY apcu.ini /etc/php7.1/conf.d/apcu.ini
|
2016-07-01 12:11:22 +02:00
|
|
|
COPY run.sh /usr/local/bin/run.sh
|
2016-10-12 10:32:58 +02:00
|
|
|
COPY setup.sh /usr/local/bin/setup.sh
|
2016-08-27 21:31:49 +02:00
|
|
|
COPY occ /usr/local/bin/occ
|
2016-09-16 17:08:06 +02:00
|
|
|
COPY s6.d /etc/s6.d
|
2016-07-01 12:11:22 +02:00
|
|
|
|
2016-09-24 11:48:17 +02:00
|
|
|
RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
2016-07-01 12:11:22 +02:00
|
|
|
|
2017-02-15 17:36:36 +01:00
|
|
|
VOLUME /data /config /apps2
|
2016-07-01 12:11:22 +02:00
|
|
|
|
2016-09-16 17:08:06 +02:00
|
|
|
EXPOSE 8888
|
2016-07-01 12:11:22 +02:00
|
|
|
|
|
|
|
LABEL description="A server software for creating file hosting services" \
|
2017-02-15 17:36:36 +01:00
|
|
|
nextcloud="Nextcloud daily" \
|
|
|
|
maintainer="Wonderfall <wonderfall@targaryen.house>"
|
2016-07-01 12:11:22 +02:00
|
|
|
|
2016-09-16 17:08:06 +02:00
|
|
|
CMD ["run.sh"]
|