Commit 93601b11 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] php70 without daemons

parent 6aa5e2da
......@@ -2,5 +2,8 @@ FROM typo3gmbh/baseimage:2.0
MAINTAINER TYPO3 GmbH <info@typo3.com>
ADD . /pd_build
RUN /pd_build/install.sh
CMD ["/sbin/my_init"]
RUN /pd_build/enable_repos.sh && \
/pd_build/nodejs.sh && \
/pd_build/php.sh && \
/pd_build/finalize.sh
......@@ -3,9 +3,9 @@ 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 "$@"
if [[ ! -e /var/lib/apt/lists/lock ]]; then
apt-get update
fi
apt-get install -y --no-install-recommends "$@"
}
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
# some hard dependencies of chrome / chromedriver
minimal_apt_get_install \
libgconf2-4 \
google-chrome-stable \
#
GRANT ALL ON `func\_%`.* to funcu@'%' IDENTIFIED BY 'funcp' WITH GRANT OPTION;
GRANT ALL ON `func\_%`.* to funcu@'localhost' IDENTIFIED BY 'funcp' WITH GRANT OPTION;
FLUSH PRIVILEGES;
[mysqld]
init-file=/etc/mysql/grants.sql
......@@ -8,34 +8,10 @@ apt-get update
# ondrej with php 7.0
echo deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main > /etc/apt/sources.list.d/php.list
# postgres with 9.5 next to 10
echo deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main > /etc/apt/sources.list.d/postgres.list
minimal_apt_get_install \
dirmngr \
gpg-agent \
#
# The recv-keys part takes a bit of time, so it's faster to receive multiple keys at once.
# ondrej key - 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 \
#
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
# mssql and tools
# curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
# curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
# curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | tee /etc/apt/sources.list.d/msprod.list
# google-chrome
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list
E5267A6C \
#
apt-get update
apt-get -y dist-upgrade
# Set a hard IP for some typo3.org services for now until maybe anytime server team decides
# to get DNS right again
echo "136.243.44.172 review.typo3.org" >> /etc/hosts
echo "136.243.44.172 git.typo3.org" >> /etc/hosts
\ No newline at end of file
......@@ -5,36 +5,37 @@ set -x
# remove a ton of packages needed for compilation of apcu and apcu-bc
apt-get remove -y --purge \
autoconf \
automake \
autotools-dev \
file \
libpcre16-3 \
libpcre3-dev \
libpcre32-3 \
libpcrecpp0v5 \
libquadmath0 \
libtool \
libtsan0 \
libubsan0 \
m4 \
php7.0-dev \
shtool \
#
autoconf \
automake \
autotools-dev \
file \
libpcre16-3 \
libpcre3-dev \
libpcre32-3 \
libpcrecpp0v5 \
libquadmath0 \
libtool \
libtsan0 \
libubsan0 \
m4 \
php7.0-dev \
shtool \
#
# but keep make and g++ ... to not confuse with above list, just install again if needed
minimal_apt_get_install \
make \
g++
make \
g++ \
#
apt-get clean
apt-get -y autoremove
rm -rf \
/var/lib/apt/lists/* \
/root/.npm/ \
/tmp/* \
/var/tmp/* \
/usr/local/src/* \
#
/tmp/* \
/var/tmp/* \
/usr/local/src/* \
#
rm -rf /pd_build
#!/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/postgres.sh
# /pd_build/mssql.sh
/pd_build/redis-server.sh
/pd_build/memcached.sh
/pd_build/nodejs.sh
/pd_build/php.sh
/pd_build/chrome.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
ACCEPT_EULA=Y minimal_apt_get_install \
mssql-server \
sudo \
mssql-tools \
unixodbc-dev \
#
ACCEPT_EULA='Y' MSSQL_PID='Developer' MSSQL_SA_PASSWORD='Test1234!' /opt/mssql/bin/mssql-conf setup || true
## Enable mysql
cp -a /pd_build/runit/mssql /etc/service/mssql
#!/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
......@@ -4,39 +4,44 @@ source /pd_build/buildconfig
set -x
minimal_apt_get_install \
build-essential \
php-apcu \
php7.0 \
php7.0-bcmath \
php7.0-bz2 \
php7.0-cli \
php7.0-common \
php7.0-curl \
php7.0-dev \
php7.0-gd \
php7.0-gmp \
php7.0-imap \
php7.0-intl \
php7.0-json \
php7.0-mbstring \
php7.0-mcrypt \
php7.0-mysql \
php7.0-opcache \
php7.0-pgsql \
php7.0-pspell \
php7.0-readline \
php7.0-recode \
php7.0-soap \
php7.0-sqlite3 \
php7.0-xml \
php7.0-xmlrpc \
php7.0-xsl \
php7.0-zip \
php-redis \
php-memcached \
php-xdebug \
php-pear \
#
build-essential \
php-apcu \
php7.0 \
php7.0-bcmath \
php7.0-bz2 \
php7.0-cli \
php7.0-common \
php7.0-curl \
php7.0-dev \
php7.0-gd \
php7.0-gmp \
php7.0-imap \
php7.0-intl \
php7.0-json \
php7.0-mbstring \
php7.0-mcrypt \
php7.0-mysql \
php7.0-opcache \
php7.0-pgsql \
php7.0-pspell \
php7.0-readline \
php7.0-recode \
php7.0-soap \
php7.0-sqlite3 \
php7.0-xml \
php7.0-xmlrpc \
php7.0-xsl \
php7.0-zip \
php-redis \
php-memcached \
php-xdebug \
php-pear \
graphicsmagick \
imagemagick \
zip \
unzip \
sqlite3 \
#
# Enable phar writing for packaging tasks
sed -i s/';phar.readonly = On'/'phar.readonly = Off'/ /etc/php/7.0/cli/php.ini
......@@ -68,15 +73,6 @@ php -i | \
grep -v '^;' | \
grep -v '^$' > /etc/php/cli-no-xdebug/php.ini
# Install common tools
minimal_apt_get_install \
graphicsmagick \
imagemagick \
zip \
unzip \
sqlite3 \
#
# Install composer
curl -sSL https://getcomposer.org/download/1.6.3/composer.phar -o /usr/bin/composer
chmod +x /usr/bin/composer
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
# Install postgres 9.5 and 10
minimal_apt_get_install \
postgresql-10 \
postgresql-9.5 \
#
# Enable postgres
cp -a /pd_build/runit/postgres /etc/service/postgres
cp -a /pd_build/runit/postgres95 /etc/service/postgres95
#!/bin/bash
set -e
source /pd_build/buildconfig
set -x
## Install common packages
minimal_apt_get_install \
ack-grep \
openssh-client \
bzip2 \
pbzip2 \
curl \
patch \
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
## Create a user for the bamboo agent.
addgroup --gid 9999 bamboo
adduser --uid 9999 --gid 9999 --disabled-password --gecos "Bamboo Remote Agent" bamboo
#!/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
sed -i 's/daemonize yes/daemonize no/' /etc/redis/redis.conf
sed -i 's/bind 127.0.0.1 ::1/bind 127.0.0.1/' /etc/redis/redis.conf
#!/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/mssql
exec svlogd -tt /var/log/mssql
#!/bin/sh
exec 2>&1
exec chpst -u mssql /opt/mssql/bin/sqlservr
\ No newline at end of file
#!/bin/sh
mkdir -p /var/log/mariadb
exec svlogd -tt /var/log/mariadb
Markdown is supported
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