nextcloud/Dockerfile

78 lines
2.4 KiB
Docker

FROM alpine:3.10 AS builder
ENV NC_VERSION=16.0.1
ENV NC_SHA256_SUM=a80ce586e9e930b2fba69707311e575346cd4dc4402e84678c730f9930d78aee
RUN wget https://download.nextcloud.com/server/releases/nextcloud-$NC_VERSION.tar.bz2
RUN echo "$NC_SHA256_SUM nextcloud-$NC_VERSION.tar.bz2" | sha256sum -c - || exit 1
RUN mkdir -p /var/lib/nextcloud
RUN tar xjf nextcloud-$NC_VERSION.tar.bz2 -C /var/lib/nextcloud --strip 1
ENV TFA_VERSION=v2.1.2
ENV TFA_SHA256_SUM=06bf8c01909c15efbe42b949532ba48a68adc9a275e43ede91249453a1ef468b
RUN wget https://github.com/nextcloud/twofactor_totp/releases/download/$TFA_VERSION/twofactor_totp.tar.gz
RUN echo "$TFA_SHA256_SUM twofactor_totp.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/twofactor_totp
RUN tar xzf twofactor_totp.tar.gz -C /var/lib/nextcloud/apps/twofactor_totp --strip 1
ENV U2F_VERSION=v3.0.0
ENV U2F_SHA256_SUM=bb2be4b4f3367b0ba8c8e78cba727ee521df116d2f76a0a73cf956c710d2c08b
RUN wget https://github.com/nextcloud/twofactor_u2f/releases/download/$U2F_VERSION/twofactor_u2f.tar.gz
RUN echo "$U2F_SHA256_SUM twofactor_u2f.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/twofactor_u2f
RUN tar xzf twofactor_u2f.tar.gz -C /var/lib/nextcloud/apps/twofactor_u2f --strip 1
ENV POLLS_VERSION=v0.10.3
ENV POLLS_SHA256_SUM=43f5a142aebdf32211f05eef01c0a98fbfe18fc6b4b9e1b3f6d3079c55254e0d
RUN wget https://github.com/nextcloud/polls/releases/download/$POLLS_VERSION/polls.tar.gz
RUN echo "$POLLS_SHA256_SUM polls.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/polls
RUN tar xzf polls.tar.gz -C /var/lib/nextcloud/apps/polls --strip 1
FROM thallian/php7-fpm:latest
COPY --from=builder /var/lib/nextcloud /var/lib/nextcloud
ENV FPMUSER=nginx
ENV FPMGROUP=nginx
ENV PHP_MEMORY_LIMIT=512M
RUN apk add --no-cache \
nginx \
ffmpeg \
php7-cli \
php7-pecl-apcu \
php7-opcache \
php7-pcntl \
php7-imagick \
php7-ctype \
php7-curl \
php7-dom \
php7-gd \
php7-iconv \
php7-xml \
php7-json \
php7-mbstring \
php7-openssl \
php7-posix \
php7-session \
php7-simplexml \
php7-xmlreader \
php7-xmlwriter \
php7-zip \
php7-zlib \
php7-pdo_pgsql \
php7-bz2 \
php7-fileinfo \
php7-intl \
php7-exif \
php7-ldap
RUN chown -R nginx:nginx /var/lib/nextcloud
RUN mkdir /run/nginx
RUN rm /etc/nginx/conf.d/default.conf
ADD /rootfs /
VOLUME [ "/var/lib/nextcloud/data", "/var/lib/nextcloud/config" ]