You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. FROM wonderfall/nginx-php:7.1
  2. ARG NEXTCLOUD_VERSION=12.0.4
  3. ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
  4. ENV UID=991 GID=991 \
  5. UPLOAD_MAX_SIZE=10G \
  6. APC_SHM_SIZE=128M \
  7. OPCACHE_MEM_SIZE=128 \
  8. MEMORY_LIMIT=512M \
  9. CRON_PERIOD=15m \
  10. CRON_MEMORY_LIMIT=1g \
  11. TZ=Etc/UTC \
  12. DB_TYPE=sqlite3 \
  13. DOMAIN=localhost
  14. RUN apk -U upgrade \
  15. && apk add -t build-dependencies \
  16. gnupg \
  17. tar \
  18. build-base \
  19. autoconf \
  20. automake \
  21. pcre-dev \
  22. libtool \
  23. samba-dev \
  24. && apk add \
  25. libressl \
  26. ca-certificates \
  27. libsmbclient \
  28. tzdata \
  29. && pecl install \
  30. smbclient \
  31. apcu \
  32. redis \
  33. && echo "extension=smbclient.so" > /php/conf.d/smbclient.ini \
  34. && echo "extension=redis.so" > /php/conf.d/redis.ini \
  35. && mkdir /nextcloud \
  36. && cd /tmp \
  37. && NEXTCLOUD_TARBALL="nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
  38. && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL} \
  39. && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.sha512 \
  40. && wget -q https://download.nextcloud.com/server/releases/${NEXTCLOUD_TARBALL}.asc \
  41. && wget -q https://nextcloud.com/nextcloud.asc \
  42. && echo "Verifying both integrity and authenticity of ${NEXTCLOUD_TARBALL}..." \
  43. && CHECKSUM_STATE=$(echo -n $(sha512sum -c ${NEXTCLOUD_TARBALL}.sha512) | tail -c 2) \
  44. && if [ "${CHECKSUM_STATE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \
  45. && gpg --import nextcloud.asc \
  46. && FINGERPRINT="$(LANG=C gpg --verify ${NEXTCLOUD_TARBALL}.asc ${NEXTCLOUD_TARBALL} 2>&1 \
  47. | sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \
  48. && if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \
  49. && if [ "${FINGERPRINT}" != "${GPG_nextcloud}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \
  50. && echo "All seems good, now unpacking ${NEXTCLOUD_TARBALL}..." \
  51. && tar xjf ${NEXTCLOUD_TARBALL} --strip 1 -C /nextcloud \
  52. && update-ca-certificates \
  53. && apk del build-dependencies \
  54. && rm -rf /var/cache/apk/* /tmp/* /root/.gnupg
  55. COPY rootfs /
  56. RUN chmod +x /usr/local/bin/* /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
  57. VOLUME /data /config /apps2 /nextcloud/themes
  58. EXPOSE 8888
  59. LABEL description="A server software for creating file hosting services" \
  60. nextcloud="Nextcloud v${NEXTCLOUD_VERSION}" \
  61. maintainer="Wonderfall <wonderfall@targaryen.house>"
  62. CMD ["run.sh"]