Commit 39e14088 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Prepare php55, php56, php71

parent 9e98eb34
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
## ondrej with php 7.1
echo deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main > /etc/apt/sources.list.d/php.list
# The recv-keys part takes a bit of time, so it's faster to receive multiple keys at once.
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys \
E5267A6C \
#
## NodeSource's Node.js repository
curl --fail -sL https://deb.nodesource.com/setup_4.x | bash -
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
# remove a ton of packages needed for compilation of apcu and apcu-bc
apt-get remove -y --purge autoconf automake autotools-dev binutils cpp cpp-5 file gcc gcc-5 libasan2 libatomic1 libc-dev-bin libc6-dev libcc1-0 libcilkrts5 libgcc-5-dev libisl15 libitm1 liblsan0 libmpc3 libmpfr4 libmpx0 libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libquadmath0 libsigsegv2 libssl-dev libtool libtsan0 libubsan0 linux-libc-dev m4 make php7.1-dev shtool zlib1g-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
# xvfb and some hard dependencies of firefox
minimal_apt_get_install \
xvfb \
libxcomposite1 \
libasound2 \
libgtk2.0-0 \
#
curl -SL --progress-bar https://ftp.mozilla.org/pub/firefox/releases/45.4.0esr/linux-x86_64/en-US/firefox-45.4.0esr.tar.bz2 -o /tmp/firefox.tar.bz2
tar xv -C /opt/ -f /tmp/firefox.tar.bz2
ln -s /opt/firefox/firefox /usr/bin/firefox
mkdir /tmp/.X11-unix
chmod 1777 /tmp/.X11-unix
chown root /tmp/.X11-unix/
\ No newline at end of file
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
/pd_build/enable_repos.sh
/pd_build/prepare.sh
/pd_build/mysql.sh
/pd_build/redis-server.sh
/pd_build/memcached.sh
/pd_build/nodejs.sh
/pd_build/php.sh
/pd_build/firefox.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
## Install Node.js
minimal_apt_get_install nodejs
## And update nodejs on global level
npm update -g
\ No newline at end of file
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
minimal_apt_get_install \
make \
php7.1-dev \
#
cd /usr/local/src/
git clone https://github.com/krakjoe/apcu.git
cd apcu
phpize
./configure
make
make install
cd ../
git clone https://github.com/krakjoe/apcu-bc.git
cd apcu-bc
phpize
./configure
make
make install
echo "extension=apcu.so" > /etc/php/7.1/mods-available/apcu.ini
echo "apc.enable_cli=1" >> /etc/php/7.1/mods-available/apcu.ini
echo "apc.slam_defense=0" >> /etc/php/7.1/mods-available/apcu.ini
echo "extension=apc.so" > /etc/php/7.1/mods-available/apc.ini
ln -s /etc/php/7.1/mods-available/apcu.ini /etc/php/7.1/cli/conf.d/20-apcu.ini
# apc-bc module must be loaded *after* apcu, have a higher integer in front to enforce this
ln -s /etc/php/7.1/mods-available/apc.ini /etc/php/7.1/cli/conf.d/21-apc.ini
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## This script is to be run after php7.1.sh.
## Install common tools
minimal_apt_get_install \
graphicsmagick \
zip \
unzip \
#
# 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
minimal_apt_get_install \
php7.1 \
php7.1-bcmath \
php7.1-bz2 \
php7.1-cli \
php7.1-common \
php7.1-curl \
php7.1-gd \
php7.1-gmp \
php7.1-imap \
php7.1-intl \
php7.1-json \
php7.1-mbstring \
php7.1-mcrypt \
php7.1-mysql \
php7.1-opcache \
php7.1-pgsql \
php7.1-pspell \
php7.1-readline \
php7.1-recode \
php7.1-sqlite3 \
php7.1-xml \
php7.1-xmlrpc \
php7.1-xsl \
php7.1-zip \
php-redis \
php-memcached \
php-xdebug \
#
## Enable phar writing
sed -i s/';phar.readonly = On'/'phar.readonly = Off'/ /etc/php/7.1/cli/php.ini
/pd_build/php-apcu.sh
/pd_build/php-finalize.sh
#!/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
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