Commit 6d5e3f4d authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Kickstart php54

parent 70916699
FROM typo3gmbh/baseimage:1.0
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
RUN /pd_build/install.sh
CMD ["/sbin/my_init"]
export LC_ALL=C
export DEBIAN_FRONTEND=noninteractive
function minimal_apt_get_install()
{
if [[ ! -e /var/lib/apt/lists/lock ]]; then
apt-get update
fi
apt-get install -y --no-install-recommends "$@"
}
GRANT ALL ON `func\_%`.* to funcu@'%' IDENTIFIED BY 'funcp' WITH GRANT OPTION;
FLUSH PRIVILEGES;
[mysqld]
init-file=/etc/mysql/grants.sql
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
apt-get remove -y --purge \
autoconf \
bison \
dpkg-dev \
file \
flex \
gcc \
krb5-multidev \
libapparmor-dev \
libapr1-dev \
libaprutil1-dev \
libaspell-dev \
libbsd-dev \
libbz2-dev \
libc-client2007e-dev \
libcurl4-openssl-dev \
libdb-dev \
libdb5.3-dev \
libexpat1-dev \
libfontconfig1-dev \
libfreetype6-dev \
libgcrypt11-dev \
libgcrypt20-dev \
libgd-dev \
libglib2.0-dev \
libgmp3-dev \
libgnutls-dev \
libgpg-error-dev \
libice-dev \
libidn11-dev \
libjbig-dev \
libjpeg-dev \
libjpeg-turbo8-dev \
libjpeg8-dev \
libkrb5-dev \
libldap2-dev \
libltdl-dev \
liblzma-dev \
libmagic-dev \
libmcrypt-dev \
libmhash-dev \
libmysqlclient-dev \
libonig-dev \
libpcre3-dev \
libpng12-dev \
libpq-dev \
libpspell-dev \
libqdbm-dev \
libreadline-dev \
librecode-dev \
libsasl2-dev \
libsctp-dev \
libsm-dev \
libsqlite3-dev \
libssl-dev \
libsystemd-dev \
libtidy-dev \
libtiff5-dev \
libtool \
libvpx-dev \
libwebp-dev \
libxml2-dev \
libxmlrpc-epi-dev \
libxmltok1-dev \
libxpm-dev \
libxslt1-dev \
libxt-dev \
libzip-dev \
make \
pkg-config \
re2c \
unixodbc-dev \
uuid-dev \
zlib1g-dev \
autotools-dev \
binutils \
comerr-dev \
cpp \
cpp-5 \
gcc-5 \
icu-devtools \
libasan2 \
libatomic1 \
libbison-dev \
libc-client2007e \
libc-dev-bin \
libc6-dev \
libcc1-0 \
libcilkrts5 \
libdpkg-perl \
libfl-dev \
libgcc-5-dev \
libgmp-dev \
libgmpxx4ldbl \
libgnutls-openssl27 \
libgnutlsxx28 \
libgssrpc4 \
libicu-dev \
libisl15 \
libitm1 \
libkadm5clnt-mit9 \
libkadm5srv-mit9 \
libkdb5-8 \
liblsan0 \
libmagic1 \
libmpc3 \
libmpfr4 \
libmpx0 \
libp11-kit-dev \
libpam0g-dev \
libpthread-stubs0-dev \
libquadmath0 \
libreadline6-dev \
libsigsegv2 \
libstdc++-5-dev \
libtasn1-6-dev \
libtinfo-dev \
libtsan0 \
libubsan0 \
libx11-dev \
libxau-dev \
libxcb1-dev \
libxdmcp-dev \
linux-libc-dev \
m4 \
mlock \
nettle-dev \
x11proto-core-dev \
x11proto-input-dev \
x11proto-kb-dev \
xorg-sgml-doctools \
xtrans-dev \
#
apt-get clean
rm -rf \
/var/lib/apt/lists/* \
/tmp/* \
/var/tmp/* \
/usr/local/src/* \
/usr/include/php/20151012/ext/apcu/ \
#
rm -rf /pd_build
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
/pd_build/prepare.sh
/pd_build/mysql.sh
/pd_build/redis-server.sh
/pd_build/memcached.sh
/pd_build/php.sh
/pd_build/finalize.sh
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
minimal_apt_get_install \
memcached \
#
cp -a /pd_build/runit/memcached /etc/service/memcached
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Install MariaDB
minimal_apt_get_install \
mariadb-client \
mariadb-server \
#
## Additional config files
cp /pd_build/config/mysql/*.cnf /etc/mysql/mariadb.conf.d/
## Provide grants.sql
cp /pd_build/config/mysql/grants.sql /etc/mysql/grants.sql
## Enable mysql
cp -a /pd_build/runit/mysql /etc/service/mysql
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
cd /usr/local/src/
minimal_apt_get_install \
graphicsmagick \
zip \
unzip \
make \
gcc \
autoconf \
bison \
re2c \
file \
flex \
mcrypt \
aspell \
bsdmainutils \
libxpm-dev \
libsasl2-dev \
libpspell-dev \
libreadline-dev \
libaspell-dev \
libxml2 \
libxml2-dev \
libbz2-dev \
libzip-dev \
libzip4 \
zlib1g \
zlib1g-dev \
libcurl4-openssl-dev \
libcurl3 \
libcurl3-gnutls \
libc-client-dev \
libfreetype6 \
libfreetype6-dev \
libpng12-0 \
libpng12-dev \
libmcrypt-dev \
libmcrypt4 \
libtidy-dev \
libxslt1-dev \
libgnutls-dev \
krb5-multidev \
libapparmor-dev \
libapr1 \
libapr1-dev \
libaprutil1 \
libaprutil1-dev \
libarchive-zip-perl \
libasprintf0v5 \
libbsd-dev \
libcroco3 \
libct4 \
libdb-dev \
libdb5.3-dev \
libelf1 \
libexpat1-dev \
libfontconfig1-dev \
libgcrypt11-dev \
libgcrypt20-dev \
libgd-dev \
libgd3 \
libglib2.0-bin \
libglib2.0-data \
libglib2.0-dev \
libgmp3-dev \
libgpg-error-dev \
libhunspell-1.3-0 \
libib-util \
libice-dev \
libice6 \
libjbig-dev \
libjbig0 \
libjpeg-dev \
libjpeg-turbo8-dev \
libjpeg8-dev \
libkrb5-dev \
libldap2-dev \
libltdl-dev \
libltdl7 \
liblzma-dev \
libmagic-dev \
libmhash-dev \
libmysqlclient-dev \
libodbc1 \
libonig-dev \
libonig2 \
libpcre16-3 \
libpcre3-dev \
libpcre32-3 \
libpcrecpp0v5 \
libpipeline1 \
libpq-dev \
libpq5 \
libpython-stdlib \
libpython2.7-minimal \
libpython2.7-stdlib \
libqdbm-dev \
libqdbm14 \
librecode-dev \
librecode0 \
libsctp-dev \
libsctp1 \
libsm-dev \
libsm6 \
libsqlite3-dev \
libsybdb5 \
libsystemd-dev \
libtiff5 \
libtiff5-dev \
libtiffxx5 \
libtimedate-perl \
libtool \
libunistring0 \
libvpx-dev \
libvpx3 \
libwebp-dev \
libwebp5 \
libwebpdemux1 \
libwebpmux1 \
libxmlrpc-epi-dev \
libxmlrpc-epi0 \
libxmltok1 \
libxmltok1-dev \
libxt-dev \
libxt6 \
unixodbc \
unixodbc-dev \
uuid-dev \
#
curl -SL --progress-bar https://www.openssl.org/source/old/0.9.x/openssl-0.9.8v.tar.gz -o openssl-0.9.8v.tar.gz
tar xvf openssl-0.9.8v.tar.gz
cd openssl-0.9.8v
./config
make
make install_sw
cd ..
curl -SL --progress-bar http://in1.php.net/distributions/php-5.3.29.tar.bz2 -o php-5.3.29.tar.bz2
curl -SL --progress-bar http://in1.php.net/distributions/php-5.4.45.tar.bz2 -o php-5.4.45.tar.bz2
tar -xvf php-5.4.45.tar.bz2
cd php-5.4.45
./configure \
--without-t1lib \
--disable-short-tags \
--enable-pcntl \
--with-tsrm-pthreads \
--with-mysqli=mysqlnd \
--with-mysql=mysqlnd \
--with-pdo-mysql \
--with-zlib \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-bcmath \
--with-bz2 \
--enable-calendar \
--enable-exif \
--enable-ftp \
--with-gd \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-iconv-dir \
--with-gettext \
--enable-mbstring \
--with-mcrypt \
--with-mhash \
--with-pspell \
--with-readline \
--enable-soap \
--enable-sockets \
--with-sqlite \
--enable-sqlite-utf8 \
--enable-wddx \
--with-xmlrpc \
--with-xsl \
--with-openssl=/usr/local/ssl/ \
--enable-zip \
--with-tidy \
--with-curl \
#
make -j 10
make install
cp /usr/local/src/php-5.3.29/php.ini-development /usr/local/lib/php.ini
# more memory
sed -i s/'memory_limit = 128M'/'memory_limit = 1280M'/ /usr/local/lib/php.ini
sed -i s/';phar.readonly = On'/'phar.readonly = Off'/ /usr/local/lib/php.ini
# Install composer
curl -sSL https://getcomposer.org/download/1.1.2/composer.phar -o /usr/bin/composer
chmod +x /usr/bin/composer
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Install common packages
minimal_apt_get_install \
ack-grep \
openssh-client \
bzip2 \
curl \
git \
language-pack-de \
language-pack-en \
openjdk-8-jre-headless \
parallel \
#
# git-cherry-pick
curl -Lo /usr/bin/gerrit-cherry-pick https://review.typo3.org/tools/bin/gerrit-cherry-pick
chmod +x /usr/bin/gerrit-cherry-pick
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
minimal_apt_get_install \
redis-server \
#
cp -a /pd_build/runit/redis-server /etc/service/redis-server
#!/bin/sh
mkdir -p /var/log/memcached
exec svlogd -tt /var/log/memcached
#!/bin/sh
exec 2>&1
exec chpst -u memcache /usr/bin/memcached -l 127.0.0.1 >>/var/log/memcached.log 2>&1
#!/bin/sh
mkdir -p /var/log/mariadb
exec svlogd -tt /var/log/mariadb
#!/bin/sh
rm -rf /var/lib/mysql/*
mysql_install_db
exec 2>&1
exec /usr/bin/mysqld_safe
#!/bin/sh
mkdir -p /var/log/redis-server
exec svlogd -tt /var/log/redis-server
#!/bin/sh
exec 2>&1
exec chpst -u redis /usr/bin/redis-server /etc/redis/redis.conf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment