Skip to content

Commit

Permalink
update php libs
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Oct 26, 2017
1 parent d139168 commit 6d5b376
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 38 deletions.
52 changes: 33 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,18 @@ ENV DEBIAN_FRONTEND=noninteractive \
LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 TERM=xterm container=docker

# start
RUN apt-get -o Acquire::GzipIndexes=false update \
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
&& add-apt-repository -y ppa:pinepain/libv8-5.4 \
&& curl -s -o /tmp/couchbase-release-1.0-2-amd64.deb http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-2-amd64.deb \
&& dpkg -i /tmp/couchbase-release-1.0-2-amd64.deb \
&& add-apt-repository -y ppa:couchdb/stable \

# install
&& apt-get update && apt-get -y --no-install-recommends upgrade \
&& apt-get -y --no-install-recommends 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 \
libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev libmagickwand-dev procps imagemagick netcat php-dev php-pear \
mcrypt pwgen language-pack-en-base libicu-dev g++ cpp libglib2.0-dev incron libpcre3-dev \
&& 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 \
libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev libmagickwand-dev procps imagemagick netcat php-dev php-pear libv8-5.4-dev \
mcrypt pwgen language-pack-en-base libicu-dev g++ cpp libglib2.0-dev incron libcouchbase-dev libcouchbase2-libevent \

# dotnet deps
libc6 libcurl3 libgcc1 libgssapi-krb5-2 liblttng-ust0 libssl1.0.0 libstdc++6 libunwind8 libuuid1 zlib1g \
Expand All @@ -33,11 +39,18 @@ COPY rootfs/. /
RUN cd /tmp \
&& chmod +x /etc/service/sshd/run \
&& chmod +x /usr/bin/backup-creds.sh \
&& pecl install imagick \

&& rm -f /usr/lib/php/20151012/{couchbase.so,pcs.so,v8js.so} \
&& rm -f /usr/lib/php/20160303/{couchbase.so,pcs.so,v8js.so} \

# incrond is disabled by default, user should delete the down file after init
&& chmod +x /etc/service/incrond/run \

# install for php 7.0
&& pecl install -f -a -l v8js-1.4.1 \
&& pecl install -f pcs-1.3.3 \
&& pecl install -f couchbase-2.4.1 \
&& pecl install -f imagick \

# fixes for python
&& 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 \
Expand All @@ -46,32 +59,33 @@ RUN cd /tmp \
&& curl -o /tmp/libicu52_52.1-8ubuntu0.2_amd64.deb http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu52_52.1-8ubuntu0.2_amd64.deb \
&& dpkg -i /tmp/libicu52_52.1-8ubuntu0.2_amd64.deb \

# add php repo
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
&& apt-add-repository -y ppa:ondrej/php \
&& add-apt-repository -y ppa:pinepain/libv8-5.4 \
&& curl -s -o /tmp/couchbase-release-1.0-2-amd64.deb http://packages.couchbase.com/releases/couchbase-release/couchbase-release-1.0-2-amd64.deb \
&& dpkg -i /tmp/couchbase-release-1.0-2-amd64.deb \

# add mariadb 10.1 repo
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8 \
&& add-apt-repository 'deb [arch=amd64] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.1/ubuntu xenial main' \

# add couchdb repo
&& add-apt-repository -y ppa:couchdb/stable \

# getting repos for mongodb, java
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 \
&& echo 'deb [arch=amd64] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse' \
| sudo tee /etc/apt/sources.list.d/mongodb-3.4.list \

&& echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \
&& add-apt-repository -y ppa:webupd8team/java \

&& apt-add-repository -y ppa:ondrej/php \
&& apt-get remove -y php-pear && apt-get autoremove -y \
&& rm -rf /tmp/pear/ \
&& apt-get update && apt-get -y --no-install-recommends upgrade \

# setting up java, mongodb tools, and nodejs
&& apt-get -y --no-install-recommends install oracle-java8-installer libcouchbase-dev libv8-5.4 --allow-unauthenticated \
&& apt-get -y --no-install-recommends --allow-unauthenticated install oracle-java8-installer php-dev php-pear \
&& dpkg --configure -a \

# install for php 7.1
&& pecl install -f -a -l v8js-1.4.1 \
&& pecl install -f pcs-1.3.3 \
&& pecl install -f couchbase-2.4.1 \
&& pecl install -f imagick \

# setup other things
&& echo "\n\nJAVA_HOME=/usr/lib/jvm/java-8-oracle\nexport JAVA_HOME\n" >> /root/.profile \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
&& curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - \
Expand Down
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,25 @@
Based off https://github.com/phusion/baseimage-docker, this image contain latest runtime of various language and framework including: dotnet, java, python, and php. Ideal base image for hosting panels.

## sshd
For convienience, sshd is enabled by default. Just don't expose the port if you don't want to use sshd.
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. precompiled v8js.so v0.6.4 for php5.6 and v1.3.3 for php7.0+
2. pcs.so and couchbase.so
3. precompiled imagick so you can add it later with phpX.X-imagick package
4. composer
1. precompiled v8js-0.6.4 for php5.6
2. pecl install v8js-1.4.1 for php7.0+
3. pecl install pcs and couchbase for couchdb
4. imagemagick lib for php-imagick support
5. composer

## other runtimes
1. oracle-java8-sdk
2. nodejs 8.x
3. .NET 1.1.2 required libraries
3. .NET CORE required libraries

## add repositories
1. php
2. mariadb
3. mongodb
2. mariadb 10.1
3. mongodb 3.4
4. couchbase and couchdb
4. java

# LICENSE

The MIT License (MIT)

Copyright (c) 2017 [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# MIT

0 comments on commit 6d5b376

Please sign in to comment.