dockerfiles/owncloud/Dockerfile

93 lines
3.5 KiB
Docker
Raw Normal View History

2016-04-30 19:00:33 +02:00
FROM alpine:edge
2016-04-30 12:57:18 +02:00
MAINTAINER Wonderfall <wonderfall@schrodinger.io>
2016-04-11 15:59:32 +02:00
ARG OWNCLOUD_VERSION=9.0.2
2016-05-12 18:16:06 +02:00
ARG APCU_VERSION=5.1.4
ARG APCUBC_VERSION=1.0.3
ARG GPG_owncloud="E303 6906 AD9F 3080 7351 FAC3 2D5D 5E97 F697 8A26"
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-04-30 12:57:18 +02:00
RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \
&& echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
2016-04-30 19:00:33 +02:00
&& BUILD_DEPS=" \
build-base \
autoconf \
gnupg \
tar" \
2016-04-30 12:57:18 +02:00
&& apk -U add \
2016-04-30 19:00:33 +02:00
$BUILD_DEPS \
2016-04-11 15:59:32 +02:00
nginx \
supervisor \
2016-04-30 12:57:18 +02:00
openssl \
2016-04-11 15:59:32 +02:00
ca-certificates \
2016-04-30 19:00:33 +02:00
libwebp \
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 \
php7-zlib@testing \
php7-zip@testing \
php7-xmlreader@testing \
php7-posix@testing \
php7-openssl@testing \
2016-04-30 19:00:33 +02:00
php7-dev@testing \
php7-pear@testing \
2016-04-11 15:59:32 +02:00
&& mkdir /owncloud && cd /tmp \
&& OWNCLOUD_TARBALL="owncloud-${OWNCLOUD_VERSION}.tar.bz2" \
&& wget -q https://download.owncloud.org/community/${OWNCLOUD_TARBALL} \
&& wget -q https://download.owncloud.org/community/${OWNCLOUD_TARBALL}.sha256 \
&& wget -q https://download.owncloud.org/community/${OWNCLOUD_TARBALL}.asc \
2016-04-11 15:59:32 +02:00
&& wget -q https://owncloud.org/owncloud.asc \
&& wget -q https://pecl.php.net/get/apcu-${APCU_VERSION}.tgz \
&& wget -q https://pecl.php.net/get/apcu_bc-${APCUBC_VERSION}.tgz \
&& echo "Verifying both integrity and authenticity of ${OWNCLOUD_TARBALL}..." \
&& CHECKSUM_STATE=$(echo -n $(sha256sum -c ${OWNCLOUD_TARBALL}.sha256) | tail -c 2) \
&& if [ "${CHECKSUM_STATE}" != "OK" ]; then echo "Warning! Checksum does not match!" && exit 1; fi \
2016-05-08 21:50:10 +02:00
&& gpg --import owncloud.asc \
&& FINGERPRINT="$(LANG=C gpg --verify ${OWNCLOUD_TARBALL}.asc ${OWNCLOUD_TARBALL} 2>&1 \
| sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \
&& if [ -z "${FINGERPRINT}" ]; then echo "Warning! Invalid GPG signature!" && exit 1; fi \
&& if [ "${FINGERPRINT}" != "${GPG_owncloud}" ]; then echo "Warning! Wrong GPG fingerprint!" && exit 1; fi \
&& echo "All seems good, now unpacking ${OWNCLOUD_TARBALL}..." \
&& tar xjf ${OWNCLOUD_TARBALL} --strip 1 -C /owncloud \
&& tar xzf apcu-${APCU_VERSION}.tgz && tar xzf apcu_bc-${APCUBC_VERSION}.tgz \
&& cd apcu-${APCU_VERSION} && phpize7 && ./configure --with-php-config=/usr/bin/php-config7 && make && make install \
&& cd ../apcu_bc-${APCUBC_VERSION} && phpize7 && ./configure --with-php-config=/usr/bin/php-config7 && make && make install \
2016-04-30 13:22:04 +02:00
&& sed -i "s/;env\[PATH\]/env\[PATH\]/g" /etc/php7/php-fpm.d/www.conf \
&& apk del ${BUILD_DEPS} php7-dev php7-pear \
2016-04-30 12:57:18 +02:00
&& rm -rf /var/cache/apk/* /tmp/*
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-04-30 19:00:33 +02:00
COPY apcu.ini /etc/php7/conf.d/00_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-04-30 12:57:18 +02:00
COPY cron /etc/periodic/15min/owncloud
2016-04-11 15:59:32 +02:00
2016-04-30 12:57:18 +02:00
RUN chmod +x /usr/local/bin/run.sh /etc/periodic/15min/owncloud
2016-04-11 15:59:32 +02:00
VOLUME /data /config /apps2
EXPOSE 80
LABEL description="A server software for creating file hosting services" \
owncloud="ownCloud v${OWNCLOUD_VERSION}" \
apcu="apcu v${APCU_VERSION}" \
apcu_bc="apcu_bc v${APCUBC_VERSION}"
2016-04-11 15:59:32 +02:00
2016-05-09 18:46:01 +02:00
CMD ["/sbin/tini","--","run.sh"]