owncloud: add apcu and apcu_bc

This commit is contained in:
Wonderfall 2016-04-30 19:00:33 +02:00
parent 38858f70a2
commit 62bdca48ee
2 changed files with 24 additions and 6 deletions

View File

@ -1,21 +1,27 @@
FROM alpine:3.3 FROM alpine:edge
MAINTAINER Wonderfall <wonderfall@schrodinger.io> MAINTAINER Wonderfall <wonderfall@schrodinger.io>
ARG VERSION=9.0.1 ARG VERSION=9.0.1
ARG APCU=5.1.3
ARG APCUBC=1.0.3
ENV GID=991 UID=991 ENV GID=991 UID=991
RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ 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 \ && echo "@testing http://nl.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& echo "@edge http://nl.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories \ && BUILD_DEPS=" \
build-base \
autoconf \
gnupg \
tar" \
&& apk -U add \ && apk -U add \
$BUILD_DEPS \
nginx \ nginx \
supervisor \ supervisor \
gnupg \
tar \
openssl \ openssl \
ca-certificates \ ca-certificates \
libwebp \
tini@commuedge \ tini@commuedge \
libwebp@edge \
php7@testing \ php7@testing \
php7-fpm@testing \ php7-fpm@testing \
php7-intl@testing \ php7-intl@testing \
@ -35,23 +41,31 @@ RUN echo "@commuedge http://nl.alpinelinux.org/alpine/edge/community" >> /etc/ap
php7-xmlreader@testing \ php7-xmlreader@testing \
php7-posix@testing \ php7-posix@testing \
php7-openssl@testing \ php7-openssl@testing \
php7-dev@testing \
php7-pear@testing \
&& mkdir /owncloud && cd /tmp \ && mkdir /owncloud && cd /tmp \
&& wget -q https://download.owncloud.org/community/owncloud-$VERSION.tar.bz2 \ && wget -q https://download.owncloud.org/community/owncloud-$VERSION.tar.bz2 \
&& wget -q https://download.owncloud.org/community/owncloud-$VERSION.tar.bz2.sha256 \ && wget -q https://download.owncloud.org/community/owncloud-$VERSION.tar.bz2.sha256 \
&& wget -q https://download.owncloud.org/community/owncloud-$VERSION.tar.bz2.asc \ && wget -q https://download.owncloud.org/community/owncloud-$VERSION.tar.bz2.asc \
&& wget -q https://pecl.php.net/get/apcu-$APCU.tgz \
&& wget -q https://pecl.php.net/get/apcu_bc-$APCUBC.tgz \
&& wget -q https://owncloud.org/owncloud.asc \ && wget -q https://owncloud.org/owncloud.asc \
&& sha256sum -c owncloud-$VERSION.tar.bz2.sha256 \ && sha256sum -c owncloud-$VERSION.tar.bz2.sha256 \
&& gpg --import owncloud.asc \ && gpg --import owncloud.asc \
&& gpg --verify owncloud-$VERSION.tar.bz2.asc \ && gpg --verify owncloud-$VERSION.tar.bz2.asc \
&& tar xjf /tmp/owncloud-$VERSION.tar.bz2 --strip 1 -C /owncloud \ && tar xjf /tmp/owncloud-$VERSION.tar.bz2 --strip 1 -C /owncloud \
&& tar xzf apcu-$APCU.tgz && tar xzf apcu_bc-$APCUBC.tgz \
&& cd apcu-$APCU && phpize7 && ./configure --with-php-config=/usr/bin/php-config7 && make && make install \
&& cd ../apcu_bc-$APCUBC && phpize7 && ./configure --with-php-config=/usr/bin/php-config7 && make && make install \
&& sed -i "s/;env\[PATH\]/env\[PATH\]/g" /etc/php7/php-fpm.d/www.conf \ && sed -i "s/;env\[PATH\]/env\[PATH\]/g" /etc/php7/php-fpm.d/www.conf \
&& apk del tar ca-certificates gnupg \ && apk del $BUILD_DEPS php7-dev php7-pear \
&& rm -rf /var/cache/apk/* /tmp/* && rm -rf /var/cache/apk/* /tmp/*
COPY nginx.conf /etc/nginx/nginx.conf COPY nginx.conf /etc/nginx/nginx.conf
COPY php-fpm.conf /etc/php7/php-fpm.conf COPY php-fpm.conf /etc/php7/php-fpm.conf
COPY opcache.ini /etc/php7/conf.d/00_opcache.ini COPY opcache.ini /etc/php7/conf.d/00_opcache.ini
COPY supervisord.conf /etc/supervisor/supervisord.conf COPY supervisord.conf /etc/supervisor/supervisord.conf
COPY apcu.ini /etc/php7/conf.d/00_apcu.ini
COPY run.sh /usr/local/bin/run.sh COPY run.sh /usr/local/bin/run.sh
COPY cron /etc/periodic/15min/owncloud COPY cron /etc/periodic/15min/owncloud

4
owncloud/apcu.ini Normal file
View File

@ -0,0 +1,4 @@
extension=apcu.so
extension=apc.so
apc.enable_cli=1
apc.shm_size=256M