Last active
January 9, 2016 14:38
-
-
Save RafPe/f80aaa91d3f0a763c0b2 to your computer and use it in GitHub Desktop.
This Docker file compiles image which allows to use LDAP with owncloud within Docker container
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM php:5.6-apache | |
| RUN apt-get update && apt-get install -y \ | |
| bzip2 \ | |
| libcurl4-openssl-dev \ | |
| libfreetype6-dev \ | |
| libicu-dev \ | |
| libjpeg-dev \ | |
| libmcrypt-dev \ | |
| libmemcached-dev \ | |
| libpng12-dev \ | |
| libpq-dev \ | |
| libxml2-dev \ | |
| libldap2-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| #gpg key from https://owncloud.org/owncloud.asc | |
| RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys E3036906AD9F30807351FAC32D5D5E97F6978A26 | |
| # https://doc.owncloud.org/server/8.1/admin_manual/installation/source_installation.html#prerequisites | |
| RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr \ | |
| && docker-php-ext-install gd intl mbstring mcrypt mysql opcache pdo_mysql pdo_pgsql pgsql zip | |
| # set recommended PHP.ini settings | |
| # see https://secure.php.net/manual/en/opcache.installation.php | |
| RUN { \ | |
| echo 'opcache.memory_consumption=128'; \ | |
| echo 'opcache.interned_strings_buffer=8'; \ | |
| echo 'opcache.max_accelerated_files=4000'; \ | |
| echo 'opcache.revalidate_freq=60'; \ | |
| echo 'opcache.fast_shutdown=1'; \ | |
| echo 'opcache.enable_cli=1'; \ | |
| } > /usr/local/etc/php/conf.d/opcache-recommended.ini | |
| # PECL extensions | |
| RUN pecl install APCu-4.0.10 redis memcached \ | |
| && docker-php-ext-enable apcu redis memcached | |
| # Run extension for support of LDAP | |
| RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu \ | |
| && docker-php-ext-install ldap | |
| RUN a2enmod rewrite | |
| ENV OWNCLOUD_VERSION 8.2.2 | |
| VOLUME /var/www/html | |
| RUN curl -fsSL -o owncloud.tar.bz2 \ | |
| "https://download.owncloud.org/community/owncloud-${OWNCLOUD_VERSION}.tar.bz2" \ | |
| && curl -fsSL -o owncloud.tar.bz2.asc \ | |
| "https://download.owncloud.org/community/owncloud-${OWNCLOUD_VERSION}.tar.bz2.asc" \ | |
| && gpg --verify owncloud.tar.bz2.asc \ | |
| && tar -xjf owncloud.tar.bz2 -C /usr/src/ \ | |
| && rm owncloud.tar.bz2 owncloud.tar.bz2.asc | |
| COPY docker-entrypoint.sh /entrypoint.sh | |
| ENTRYPOINT ["/entrypoint.sh"] | |
| CMD ["apache2-foreground"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment