123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- #ADD https://www.dotdeb.org/dotdeb.gpg /tmp/dotdeb.gpg
- #RUN apt-key add /tmp/dotdeb.gpg
- #COPY php7.list /etc/apt/sources.list.d
- #
- #RUN apt-get update &&\
- # apt-get -y install\
- # apache2=2.4.*\
- # php-pear\
- # libapache2-mod-php7.0\
- # php7.0\
- # php7.0-gd\
- # php7.0-curl\
- # php7.0-pgsql\
- # php7.0-mcrypt\
- # php7.0-json &&\
- # apt-get clean
- #
- #COPY apache2.conf /etc/apache2/apache2.conf
- #COPY run.sh /run.sh
- #
- #RUN /usr/sbin/a2enmod rewrite &&\
- # ln -sf /dev/stdout /var/log/apache2/access.log &&\
- # ln -sf /dev/stderr /var/log/apache2/error.log &&\
- # rm -rf /var/www/ &&\
- # mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www &&\
- # chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www &&\
- # chmod +x /run.sh
- #
- #EXPOSE 80
- #
- #VOLUME ["/var/www"]
- #
- #CMD ["/run.sh"]
-
-
-
- FROM debian:jessie
-
- MAINTAINER Robin Thoni <robin@rthoni.com>
-
- # persistent / runtime deps
- ENV PHPIZE_DEPS \
- autoconf \
- file \
- g++ \
- gcc \
- libc-dev \
- make \
- pkg-config \
- re2c
- RUN apt-get update && apt-get install -y \
- $PHPIZE_DEPS \
- ca-certificates \
- curl \
- libedit2 \
- libsqlite3-0 \
- libxml2 \
- --no-install-recommends && rm -r /var/lib/apt/lists/*
-
- ENV PHP_INI_DIR /usr/local/etc/php
- RUN mkdir -p $PHP_INI_DIR/conf.d
-
- ##<autogenerated>##
- RUN apt-get update && apt-get install -y apache2-bin apache2.2-common --no-install-recommends && rm -rf /var/lib/apt/lists/*
-
- RUN rm -rf /var/www/html && mkdir -p /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html && chown -R www-data:www-data /var/lock/apache2 /var/run/apache2 /var/log/apache2 /var/www/html
-
- # Apache + PHP requires preforking Apache for best results
- RUN a2dismod mpm_event && a2enmod mpm_prefork
-
- RUN mv /etc/apache2/apache2.conf /etc/apache2/apache2.conf.dist && rm /etc/apache2/conf-enabled/* /etc/apache2/sites-enabled/*
- COPY apache2.conf /etc/apache2/apache2.conf
- # it'd be nice if we could not COPY apache2.conf until the end of the Dockerfile, but its contents are checked by PHP during compilation
-
- ENV PHP_EXTRA_BUILD_DEPS apache2-dev
- ENV PHP_EXTRA_CONFIGURE_ARGS --with-apxs2 --enable-maintainer-zts --enable-pthreads
- ##</autogenerated>##
-
- ENV GPG_KEYS 1A4E8B7277C42E53DBA9C7B9BCAA30EA9C0D5763
-
- ENV PHP_VERSION 7.0.7
- ENV PHP_FILENAME php-7.0.7.tar.xz
- ENV PHP_SHA256 9cc64a7459242c79c10e79d74feaf5bae3541f604966ceb600c3d2e8f5fe4794
-
- RUN set -xe \
- && buildDeps=" \
- $PHP_EXTRA_BUILD_DEPS \
- libcurl4-openssl-dev \
- libedit-dev \
- libsqlite3-dev \
- libssl-dev \
- libxml2-dev \
- xz-utils \
- " \
- && apt-get update && apt-get install -y $buildDeps --no-install-recommends && rm -rf /var/lib/apt/lists/* \
- && curl -fSL "http://php.net/get/$PHP_FILENAME/from/this/mirror" -o "$PHP_FILENAME" \
- && echo "$PHP_SHA256 *$PHP_FILENAME" | sha256sum -c - \
- && curl -fSL "http://php.net/get/$PHP_FILENAME.asc/from/this/mirror" -o "$PHP_FILENAME.asc" \
- && export GNUPGHOME="$(mktemp -d)" \
- && for key in $GPG_KEYS; do \
- gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \
- done \
- && gpg --batch --verify "$PHP_FILENAME.asc" "$PHP_FILENAME" \
- && rm -r "$GNUPGHOME" "$PHP_FILENAME.asc" \
- && mkdir -p /usr/src/php \
- && tar -xf "$PHP_FILENAME" -C /usr/src/php --strip-components=1 \
- && rm "$PHP_FILENAME" \
- && cd /usr/src/php \
- && ./configure \
- --with-config-file-path="$PHP_INI_DIR" \
- --with-config-file-scan-dir="$PHP_INI_DIR/conf.d" \
- $PHP_EXTRA_CONFIGURE_ARGS \
- --disable-cgi \
- # --enable-mysqlnd is included here because it's harder to compile after the fact than extensions are (since it's a plugin for several extensions, not an extension in itself)
- --enable-mysqlnd \
- # --enable-mbstring is included here because otherwise there's no way to get pecl to use it properly (see https://github.com/docker-library/php/issues/195)
- --enable-mbstring \
- --with-curl \
- --with-libedit \
- --with-openssl \
- --with-zlib \
- && make -j"$(nproc)" \
- && make install \
- && { find /usr/local/bin /usr/local/sbin -type f -executable -exec strip --strip-all '{}' + || true; } \
- && make clean \
- && apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $buildDeps
-
- RUN ln -sf /dev/stdout /var/log/apache2/access.log \
- && ln -sf /dev/stderr /var/log/apache2/error.log \
- && ln -sf /dev/stdout /var/log/websocket.log \
- && ln -sf /dev/stderr /var/log/websocket.err \
- && a2enmod rewrite \
- && rm -rf /var/www/* \
- && chown -R www-data:www-data /var/www
-
- RUN curl https://getcomposer.org/composer.phar -o /usr/local/bin/composer && chmod +x /usr/local/bin/composer
-
- RUN apt-get update && apt-get install -y git unzip --no-install-recommends && rm -rf /var/lib/apt/lists/*
-
- COPY php-cli.ini /etc/php7.0/cli/php.ini
-
- RUN pecl install pthreads && mkdir -p /etc/php7.0/cli
-
- COPY run.sh /usr/local/bin/
- WORKDIR /var/www
-
- EXPOSE 8180
- EXPOSE 80
- VOLUME ["/var/www"]
- CMD ["run.sh"]
|