diff --git a/Dockerfile b/Dockerfile index e212fab..d2a049f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,8 @@ RUN cd /tmp \ && chmod +x /usr/bin/backup-creds.sh \ && chmod +x /etc/service/incrond/run \ && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \ - && curl -s -o /tmp/couchbase-release-1.0-4-amd64.deb http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-4-amd64.deb \ - && dpkg -i /tmp/couchbase-release-1.0-4-amd64.deb \ + && curl -L https://packages.couchbase.com/clients/c/repos/deb/couchbase.key | apt-key add - \ + && echo "deb https://packages.couchbase.com/clients/c/repos/deb/ubuntu1604 xenial xenial/main" > /etc/apt/sources.list.d/couchbase.list \ && add-apt-repository -y ppa:couchdb/stable \ && apt-add-repository -y ppa:ondrej/php \ && add-apt-repository -y ppa:stesie/libv8 \ @@ -18,9 +18,9 @@ RUN cd /tmp \ && apt-get -y --no-install-recommends --allow-unauthenticated install wget curl unzip nano vim rsync apt-transport-https openssh-client openssh-server \ sudo tar git apt-utils software-properties-common build-essential python-dev tcl openssl libpcre3 dnsmasq ca-certificates libpcre3-dev re2c \ libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev libmagickwand-dev procps imagemagick netcat pkg-config \ - mcrypt pwgen language-pack-en-base libicu-dev g++ cpp libglib2.0-dev incron libcouchbase-dev libcouchbase2-libevent \ + mcrypt pwgen language-pack-en-base libicu-dev g++ cpp libglib2.0-dev incron libcouchbase3 libcouchbase-dev libcouchbase3-tools libcouchbase-dbg libcouchbase3-libev libcouchbase3-libevent \ libc6 libcurl3 libgcc1 libgssapi-krb5-2 liblttng-ust0 libssl1.0.0 libstdc++6 libunwind8 libuuid1 zlib1g libasan2 libv8-$V8VER-dev \ - php-pear php-xml php7.3-dev php7.3-xml php7.2-dev php7.2-xml php7.4-dev php7.4-xml \ + php-pear php-xml php7.3-dev php7.3-xml php7.4-dev php7.4-xml php8.0-dev php8.0-xml \ && systemctl disable incron \ && echo 'root' >> /etc/incron.allow \ && dpkg --configure -a \ @@ -30,13 +30,17 @@ RUN cd /tmp \ && rm -rf /var/lib/apt/lists/* \ && rm -f /core \ && ls -la /usr/lib/php +RUN /usr/bin/switch-php.sh "8.0" \ + && pecl -d php_suffix=8.0 install -f --alldeps igbinary \ + && mkdir -p /mytmp/20200930 && rsync -ahp /usr/lib/php/20200930/ /mytmp/20200930/ \ + && rm -rf /tmp/* RUN /usr/bin/switch-php.sh "7.4" \ && pecl -d php_suffix=7.4 install -f --alldeps igbinary couchbase imagick \ && git clone https://github.com/phpv8/v8js.git /tmp/v8js \ && cd /tmp/v8js \ && git checkout php7 && phpize7.4 \ - && ./configure CFLAGS="-fsanitize=address -g -O0" CXXFLAGS="-fsanitize=address -g -O0" --with-v8js=/opt/libv8-$V8VER \ - && make all test install \ + && ./configure --with-v8js=/opt/libv8-$V8VER/ CFLAGS="-fsanitize=address -g -O0" CXXFLAGS="-fsanitize=address -g -O0" CPPFLAGS="$([ $( echo "$V8VER" | cut -c 1-1 ) -ge 8 ] && echo "-DV8_COMPRESS_POINTERS" || echo "")" \ + && make all install \ && mkdir -p /mytmp/20190902 && rsync -ahp /usr/lib/php/20190902/ /mytmp/20190902/ \ && rm -rf /tmp/* RUN /usr/bin/switch-php.sh "7.3" \ @@ -46,18 +50,10 @@ RUN /usr/bin/switch-php.sh "7.3" \ && git checkout php7 && phpize7.3 \ && ./configure LDFLAGS="-lstdc++" --with-v8js=/opt/libv8-$V8VER \ && make all test install \ - && mkdir -p /mytmp/20180731 && rsync -ahp /usr/lib/php/20180731/ /mytmp/20180731/ \ - && rm -rf /tmp/* -RUN /usr/bin/switch-php.sh "7.2" \ - && pecl -d php_suffix=7.2 install -f --alldeps pcs igbinary couchbase imagick \ - && git clone https://github.com/phpv8/v8js.git /tmp/v8js \ - && cd /tmp/v8js \ - && git checkout php7 && phpize7.2 \ - && ./configure LDFLAGS="-lstdc++" --with-v8js=/opt/libv8-$V8VER \ - && make all test install \ + && rsync -ahp /mytmp/20200930/ /usr/lib/php/20200930/ \ && rsync -ahp /mytmp/20190902/ /usr/lib/php/20190902/ \ - && rsync -ahp /mytmp/20180731/ /usr/lib/php/20180731/ \ - && rm -rf /mytmp + && rm -rf /mytmp \ + && rm -rf /tmp/* RUN curl -s -o /tmp/python-support_1.0.15_all.deb https://launchpadlibrarian.net/109052632/python-support_1.0.15_all.deb \ && dpkg -i /tmp/python-support_1.0.15_all.deb \ && apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 \ diff --git a/README.md b/README.md index 0b04437..87265b9 100644 --- a/README.md +++ b/README.md @@ -5,17 +5,19 @@ Based off https://github.com/phusion/baseimage-docker, this primarily build to i For convienience, sshd is enabled by default; just don't expose docker port 22 if you don't want to use sshd. ## php files -1. pecl install latest v8 and v8js for php7.2+ +1. pecl install latest v8 and v8js for php7.3+ 2. pecl install pcs and couchbase for couchdb 3. imagemagick lib for php-imagick support ## add repositories -1. php 7.2+ +1. php 7.3+ 2. mariadb 10.2 3. mongodb 3.6 4. couchbase and couchdb ## Note +1.6.0 - remove php 7.2 and add php 8.0, remove `make test` for phpv8js for php7.4 until it is fixed. - note that couchbase and v8js are not yet compatible for php8.0 + 1.5.1 - This container will go into EOL on April 2021 following Ubuntu 16.04 LTS lifecycle policy. At best, I may start a new branch/repo for Ubuntu 20.04 LTS. 1.5.0 - removed deprecated php7.1 and add php7.4 - note that, pcs, igbinary, couchbase, and v8js are not yet compatible for php7.4