nextcloud/Dockerfile

111 lines
4.2 KiB
Docker

FROM docker.io/alpine:3.18 AS builder
ENV NC_VERSION=27.1.1
ENV NC_SHA256_SUM=3a91500566874675676fa3b5bfae2587a839cde41dfac5318043b162c1311fab
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 POLLS_VERSION=5.3.2
ENV POLLS_SHA256_SUM=5b6aa085cd53a54fca9f53dbd733eeba064e4b020f7cd4cf97895de6fdd5d62d
RUN wget https://github.com/nextcloud/polls/releases/download/v$POLLS_VERSION/polls-$POLLS_VERSION.tar.gz
RUN echo "$POLLS_SHA256_SUM polls-$POLLS_VERSION.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/polls
RUN tar xzf polls-$POLLS_VERSION.tar.gz -C /var/lib/nextcloud/apps/polls --strip 1
ENV CONTACTS_VERSION=v5.4.2
ENV CONTACTS_SHA256_SUM=365a9229094d8b205ea6d84c792f3db51358bd3b4176ef8f38d104b7c3abb8a1
RUN wget https://github.com/nextcloud-releases/contacts/releases/download/$CONTACTS_VERSION/contacts-$CONTACTS_VERSION.tar.gz
RUN echo "$CONTACTS_SHA256_SUM contacts-$CONTACTS_VERSION.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/contacts
RUN tar xzf contacts-$CONTACTS_VERSION.tar.gz -C /var/lib/nextcloud/apps/contacts --strip 1
ENV CALENDAR_VERSION=v4.5.1
ENV CALENDAR_SHA256_SUM=20543149da1b3e71b366e97faa246810d90469093440416521e36c95597f8401
RUN wget https://github.com/nextcloud-releases/calendar/releases/download/$CALENDAR_VERSION/calendar-$CALENDAR_VERSION.tar.gz
RUN echo "$CALENDAR_SHA256_SUM calendar-$CALENDAR_VERSION.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/calendar
RUN tar xzf calendar-$CALENDAR_VERSION.tar.gz -C /var/lib/nextcloud/apps/calendar --strip 1
ENV TASKS_VERSION=v0.15.0
ENV TASKS_SHA256_SUM=9e2cc95050722bbf0567a28f278cdf394e59f42940c61c2043b77e5f94c69ccf
RUN wget https://github.com/nextcloud/tasks/releases/download/$TASKS_VERSION/tasks.tar.gz
RUN echo "$TASKS_SHA256_SUM tasks.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/tasks
RUN tar xzf tasks.tar.gz -C /var/lib/nextcloud/apps/tasks --strip 1
ENV NOTES_VERSION=v4.8.1
ENV NOTES_SHA256_SUM=05f1f55beed358a651b80021290110b65bfc78f4ed250bd941530cbb7cd42d1e
RUN wget https://github.com/nextcloud/notes/releases/download/$NOTES_VERSION/notes.tar.gz
RUN echo "$NOTES_SHA256_SUM notes.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/notes
RUN tar xzf notes.tar.gz -C /var/lib/nextcloud/apps/notes --strip 1
ENV NEWS_VERSION=23.0.0
ENV NEWS_SHA256_SUM=a0f50e0a0253168a70494eaf114eaaf8c103938709276cb92f2f245f7239499d
RUN wget https://github.com/nextcloud/news/releases/download/$NEWS_VERSION/news.tar.gz
RUN echo "$NEWS_SHA256_SUM news.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/news
RUN tar xzf news.tar.gz -C /var/lib/nextcloud/apps/news --strip 1
ENV SOCIAL_LOGIN_VERSION=v5.5.3
ENV SOCIAL_LOGIN_SHA256_SUM=b967a2f96e6dadda0a0523a21156612a25483c5abbe04b2b4146ff5cb643bd75
RUN wget https://github.com/zorn-v/nextcloud-social-login/releases/download/$SOCIAL_LOGIN_VERSION/release.tar.gz
RUN echo "$SOCIAL_LOGIN_SHA256_SUM release.tar.gz" | sha256sum -c - || exit 1
RUN mkdir /var/lib/nextcloud/apps/sociallogin
RUN tar xzf release.tar.gz -C /var/lib/nextcloud/apps/sociallogin --strip 1
FROM docker.io/thallian/php8-fpm:3.18-8.2
ENV FPMUSER=nginx
ENV FPMGROUP=nginx
ENV PHP_MEMORY_LIMIT=512M
RUN apk add --no-cache \
nginx \
ffmpeg \
php82-cli \
php82-pecl-apcu \
php82-opcache \
php82-pcntl \
php82-ctype \
php82-curl \
php82-dom \
php82-gd \
php82-iconv \
php82-xml \
php82-json \
php82-mbstring \
php82-openssl \
php82-posix \
php82-session \
php82-simplexml \
php82-xmlreader \
php82-xmlwriter \
php82-zip \
php82-zlib \
php82-pdo_pgsql \
php82-bz2 \
php82-fileinfo \
php82-intl \
php82-exif \
php82-bcmath \
php82-gmp \
php82-imap \
php82-pdo \
dcron
RUN ln -s /usr/bin/php82 /usr/bin/php
COPY --from=builder --chown=nginx:nginx /var/lib/nextcloud /var/lib/nextcloud
RUN rm /etc/nginx/http.d/default.conf
ENV S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0
ADD /rootfs /
VOLUME [ "/var/lib/nextcloud/data", "/var/lib/nextcloud/config" ]