From a429042cdc5a959fde96efa7ed9a0b6083586c78 Mon Sep 17 00:00:00 2001 From: Rik Veenboer Date: Tue, 5 Apr 2016 22:37:00 +0100 Subject: [PATCH] Build webserver stack using latest versions, from debian:jessie --- bin/build | 0 bin/clean | 0 bin/enter | 0 bin/enter-bash | 0 bin/killall | 0 bin/make | 0 bin/pidenter | 0 bin/purge | 0 bin/run-bash | 0 bin/ssh | 0 bin/stopall | 0 build/Makefile | 8 ++++---- build/boot/automysqlbackup.sh | 0 build/boot/btsync.sh | 0 build/boot/couchpotato.sh | 0 build/boot/hamachi.sh | 0 build/boot/headphones.sh | 0 build/boot/lighttpd-php.sh | 0 build/boot/phpmyadmin.sh | 0 build/boot/sabnzbd.sh | 0 build/boot/sickbeard.sh | 0 build/boot/syncthing.sh | 0 build/boot/transmission.sh | 0 build/boot/webserver.sh | 0 build/make/lighttpd.mk | 2 +- build/make/php.mk | 2 +- build/runit/btsync | 0 build/runit/collectd | 0 build/runit/couchpotato | 0 build/runit/cron | 0 build/runit/ftp | 0 build/runit/gmrender | 0 build/runit/hamachi | 0 build/runit/headphones | 0 build/runit/lighttpd | 0 build/runit/lighttpd-php | 0 build/runit/minidlna | 0 build/runit/mysql | 0 build/runit/proxy | 0 build/runit/redis | 0 build/runit/sabnzbd | 0 build/runit/sickbeard | 0 build/runit/sonarr | 0 build/runit/sshd | 0 build/runit/syncthing | 0 build/runit/transmission | 0 build/runit/upnpproxy | 0 build/scripts/automysqlbackup.sh | 0 build/scripts/backintime.sh | 0 build/scripts/btsync.sh | 0 build/scripts/chrome.sh | 0 build/scripts/cleanup.sh | 0 build/scripts/collectd.sh | 0 build/scripts/compile.sh | 0 build/scripts/couchpotato.sh | 0 build/scripts/cron.sh | 0 build/scripts/firefox.sh | 0 build/scripts/ftp.sh | 0 build/scripts/gmrender.sh | 0 build/scripts/hamachi.sh | 0 build/scripts/headphones.sh | 0 build/scripts/init.sh | 0 build/scripts/lighttpd-php.sh | 0 build/scripts/lighttpd.sh | 5 +---- build/scripts/minidlna.sh | 0 build/scripts/mysql.sh | 0 build/scripts/php.sh | 15 ++++++++------- build/scripts/phpmyadmin.sh | 9 +++++---- build/scripts/prepare.sh | 9 ++------- build/scripts/pulseaudio.sh | 0 build/scripts/redis.sh | 0 build/scripts/runit.sh | 0 build/scripts/sabnzbd.sh | 0 build/scripts/sickbeard.sh | 0 build/scripts/sonarr.sh | 0 build/scripts/sshd.sh | 0 build/scripts/subliminal.sh | 0 build/scripts/syncthing.sh | 0 build/scripts/syslog.sh | 0 build/scripts/testing.sh | 0 build/scripts/transmission.sh | 0 build/scripts/upnpproxy.sh | 0 build/scripts/user.sh | 0 build/scripts/utilities.sh | 0 build/scripts/webserver.sh | 0 85 files changed, 22 insertions(+), 28 deletions(-) mode change 100644 => 100755 bin/build mode change 100644 => 100755 bin/clean mode change 100644 => 100755 bin/enter mode change 100644 => 100755 bin/enter-bash mode change 100644 => 100755 bin/killall mode change 100644 => 100755 bin/make mode change 100644 => 100755 bin/pidenter mode change 100644 => 100755 bin/purge mode change 100644 => 100755 bin/run-bash mode change 100644 => 100755 bin/ssh mode change 100644 => 100755 bin/stopall mode change 100644 => 100755 build/boot/automysqlbackup.sh mode change 100644 => 100755 build/boot/btsync.sh mode change 100644 => 100755 build/boot/couchpotato.sh mode change 100644 => 100755 build/boot/hamachi.sh mode change 100644 => 100755 build/boot/headphones.sh mode change 100644 => 100755 build/boot/lighttpd-php.sh mode change 100644 => 100755 build/boot/phpmyadmin.sh mode change 100644 => 100755 build/boot/sabnzbd.sh mode change 100644 => 100755 build/boot/sickbeard.sh mode change 100644 => 100755 build/boot/syncthing.sh mode change 100644 => 100755 build/boot/transmission.sh mode change 100644 => 100755 build/boot/webserver.sh mode change 100644 => 100755 build/runit/btsync mode change 100644 => 100755 build/runit/collectd mode change 100644 => 100755 build/runit/couchpotato mode change 100644 => 100755 build/runit/cron mode change 100644 => 100755 build/runit/ftp mode change 100644 => 100755 build/runit/gmrender mode change 100644 => 100755 build/runit/hamachi mode change 100644 => 100755 build/runit/headphones mode change 100644 => 100755 build/runit/lighttpd mode change 100644 => 100755 build/runit/lighttpd-php mode change 100644 => 100755 build/runit/minidlna mode change 100644 => 100755 build/runit/mysql mode change 100644 => 100755 build/runit/proxy mode change 100644 => 100755 build/runit/redis mode change 100644 => 100755 build/runit/sabnzbd mode change 100644 => 100755 build/runit/sickbeard mode change 100644 => 100755 build/runit/sonarr mode change 100644 => 100755 build/runit/sshd mode change 100644 => 100755 build/runit/syncthing mode change 100644 => 100755 build/runit/transmission mode change 100644 => 100755 build/runit/upnpproxy mode change 100644 => 100755 build/scripts/automysqlbackup.sh mode change 100644 => 100755 build/scripts/backintime.sh mode change 100644 => 100755 build/scripts/btsync.sh mode change 100644 => 100755 build/scripts/chrome.sh mode change 100644 => 100755 build/scripts/cleanup.sh mode change 100644 => 100755 build/scripts/collectd.sh mode change 100644 => 100755 build/scripts/compile.sh mode change 100644 => 100755 build/scripts/couchpotato.sh mode change 100644 => 100755 build/scripts/cron.sh mode change 100644 => 100755 build/scripts/firefox.sh mode change 100644 => 100755 build/scripts/ftp.sh mode change 100644 => 100755 build/scripts/gmrender.sh mode change 100644 => 100755 build/scripts/hamachi.sh mode change 100644 => 100755 build/scripts/headphones.sh mode change 100644 => 100755 build/scripts/init.sh mode change 100644 => 100755 build/scripts/lighttpd-php.sh mode change 100644 => 100755 build/scripts/lighttpd.sh mode change 100644 => 100755 build/scripts/minidlna.sh mode change 100644 => 100755 build/scripts/mysql.sh mode change 100644 => 100755 build/scripts/php.sh mode change 100644 => 100755 build/scripts/phpmyadmin.sh mode change 100644 => 100755 build/scripts/prepare.sh mode change 100644 => 100755 build/scripts/pulseaudio.sh mode change 100644 => 100755 build/scripts/redis.sh mode change 100644 => 100755 build/scripts/runit.sh mode change 100644 => 100755 build/scripts/sabnzbd.sh mode change 100644 => 100755 build/scripts/sickbeard.sh mode change 100644 => 100755 build/scripts/sonarr.sh mode change 100644 => 100755 build/scripts/sshd.sh mode change 100644 => 100755 build/scripts/subliminal.sh mode change 100644 => 100755 build/scripts/syncthing.sh mode change 100644 => 100755 build/scripts/syslog.sh mode change 100644 => 100755 build/scripts/testing.sh mode change 100644 => 100755 build/scripts/transmission.sh mode change 100644 => 100755 build/scripts/upnpproxy.sh mode change 100644 => 100755 build/scripts/user.sh mode change 100644 => 100755 build/scripts/utilities.sh mode change 100644 => 100755 build/scripts/webserver.sh diff --git a/bin/build b/bin/build old mode 100644 new mode 100755 diff --git a/bin/clean b/bin/clean old mode 100644 new mode 100755 diff --git a/bin/enter b/bin/enter old mode 100644 new mode 100755 diff --git a/bin/enter-bash b/bin/enter-bash old mode 100644 new mode 100755 diff --git a/bin/killall b/bin/killall old mode 100644 new mode 100755 diff --git a/bin/make b/bin/make old mode 100644 new mode 100755 diff --git a/bin/pidenter b/bin/pidenter old mode 100644 new mode 100755 diff --git a/bin/purge b/bin/purge old mode 100644 new mode 100755 diff --git a/bin/run-bash b/bin/run-bash old mode 100644 new mode 100755 diff --git a/bin/ssh b/bin/ssh old mode 100644 new mode 100755 diff --git a/bin/stopall b/bin/stopall old mode 100644 new mode 100755 diff --git a/build/Makefile b/build/Makefile index 82a3446..f730aba 100644 --- a/build/Makefile +++ b/build/Makefile @@ -1,5 +1,5 @@ TMP = /build/tmp -FROM = ubuntu:trusty +FROM = debian:jessie MODE = normal ARGS = --rm=false --no-cache=false include $(wildcard $(DOCKER_HOME)/build/make/*.mk) @@ -34,7 +34,7 @@ all: build bin service clean build: prepare base $(call script,cleanup) - @echo 'RUN chmod +x /opt/init.d/* || :' >> ${FILE} + @echo 'RUN chmod +x -R /opt/init.d' >> ${FILE} @echo 'CMD ["/opt/init"]' >> ${FILE} @docker build -t $(NAME):$(VERSION) $(ARGS) -f $(FILE) $(DOCKER_HOME)/build @rm ${FILE} @@ -44,9 +44,9 @@ prepare: @echo FROM $(FROM) > ${FILE} @echo ENV MODE $(MODE) >> ${FILE} $(call add,config,/build/config) - $(call add,init,/opt/init) + $(call add,init,/opt/init) + @echo 'RUN chmod +x /opt/init' >> ${FILE} $(call script,prepare) - clean: @rm -f ${FILE} @rm -rf build diff --git a/build/boot/automysqlbackup.sh b/build/boot/automysqlbackup.sh old mode 100644 new mode 100755 diff --git a/build/boot/btsync.sh b/build/boot/btsync.sh old mode 100644 new mode 100755 diff --git a/build/boot/couchpotato.sh b/build/boot/couchpotato.sh old mode 100644 new mode 100755 diff --git a/build/boot/hamachi.sh b/build/boot/hamachi.sh old mode 100644 new mode 100755 diff --git a/build/boot/headphones.sh b/build/boot/headphones.sh old mode 100644 new mode 100755 diff --git a/build/boot/lighttpd-php.sh b/build/boot/lighttpd-php.sh old mode 100644 new mode 100755 diff --git a/build/boot/phpmyadmin.sh b/build/boot/phpmyadmin.sh old mode 100644 new mode 100755 diff --git a/build/boot/sabnzbd.sh b/build/boot/sabnzbd.sh old mode 100644 new mode 100755 diff --git a/build/boot/sickbeard.sh b/build/boot/sickbeard.sh old mode 100644 new mode 100755 diff --git a/build/boot/syncthing.sh b/build/boot/syncthing.sh old mode 100644 new mode 100755 diff --git a/build/boot/transmission.sh b/build/boot/transmission.sh old mode 100644 new mode 100755 diff --git a/build/boot/webserver.sh b/build/boot/webserver.sh old mode 100644 new mode 100755 diff --git a/build/make/lighttpd.mk b/build/make/lighttpd.mk index 3ce3f66..fe3465a 100644 --- a/build/make/lighttpd.mk +++ b/build/make/lighttpd.mk @@ -1,3 +1,3 @@ -lighttpd: +lighttpd: compile $(call script,$@) $(call runit,$@) \ No newline at end of file diff --git a/build/make/php.mk b/build/make/php.mk index 47ae66d..82f5824 100644 --- a/build/make/php.mk +++ b/build/make/php.mk @@ -1,2 +1,2 @@ -php: +php: compile $(call script,$@) \ No newline at end of file diff --git a/build/runit/btsync b/build/runit/btsync old mode 100644 new mode 100755 diff --git a/build/runit/collectd b/build/runit/collectd old mode 100644 new mode 100755 diff --git a/build/runit/couchpotato b/build/runit/couchpotato old mode 100644 new mode 100755 diff --git a/build/runit/cron b/build/runit/cron old mode 100644 new mode 100755 diff --git a/build/runit/ftp b/build/runit/ftp old mode 100644 new mode 100755 diff --git a/build/runit/gmrender b/build/runit/gmrender old mode 100644 new mode 100755 diff --git a/build/runit/hamachi b/build/runit/hamachi old mode 100644 new mode 100755 diff --git a/build/runit/headphones b/build/runit/headphones old mode 100644 new mode 100755 diff --git a/build/runit/lighttpd b/build/runit/lighttpd old mode 100644 new mode 100755 diff --git a/build/runit/lighttpd-php b/build/runit/lighttpd-php old mode 100644 new mode 100755 diff --git a/build/runit/minidlna b/build/runit/minidlna old mode 100644 new mode 100755 diff --git a/build/runit/mysql b/build/runit/mysql old mode 100644 new mode 100755 diff --git a/build/runit/proxy b/build/runit/proxy old mode 100644 new mode 100755 diff --git a/build/runit/redis b/build/runit/redis old mode 100644 new mode 100755 diff --git a/build/runit/sabnzbd b/build/runit/sabnzbd old mode 100644 new mode 100755 diff --git a/build/runit/sickbeard b/build/runit/sickbeard old mode 100644 new mode 100755 diff --git a/build/runit/sonarr b/build/runit/sonarr old mode 100644 new mode 100755 diff --git a/build/runit/sshd b/build/runit/sshd old mode 100644 new mode 100755 diff --git a/build/runit/syncthing b/build/runit/syncthing old mode 100644 new mode 100755 diff --git a/build/runit/transmission b/build/runit/transmission old mode 100644 new mode 100755 diff --git a/build/runit/upnpproxy b/build/runit/upnpproxy old mode 100644 new mode 100755 diff --git a/build/scripts/automysqlbackup.sh b/build/scripts/automysqlbackup.sh old mode 100644 new mode 100755 diff --git a/build/scripts/backintime.sh b/build/scripts/backintime.sh old mode 100644 new mode 100755 diff --git a/build/scripts/btsync.sh b/build/scripts/btsync.sh old mode 100644 new mode 100755 diff --git a/build/scripts/chrome.sh b/build/scripts/chrome.sh old mode 100644 new mode 100755 diff --git a/build/scripts/cleanup.sh b/build/scripts/cleanup.sh old mode 100644 new mode 100755 diff --git a/build/scripts/collectd.sh b/build/scripts/collectd.sh old mode 100644 new mode 100755 diff --git a/build/scripts/compile.sh b/build/scripts/compile.sh old mode 100644 new mode 100755 diff --git a/build/scripts/couchpotato.sh b/build/scripts/couchpotato.sh old mode 100644 new mode 100755 diff --git a/build/scripts/cron.sh b/build/scripts/cron.sh old mode 100644 new mode 100755 diff --git a/build/scripts/firefox.sh b/build/scripts/firefox.sh old mode 100644 new mode 100755 diff --git a/build/scripts/ftp.sh b/build/scripts/ftp.sh old mode 100644 new mode 100755 diff --git a/build/scripts/gmrender.sh b/build/scripts/gmrender.sh old mode 100644 new mode 100755 diff --git a/build/scripts/hamachi.sh b/build/scripts/hamachi.sh old mode 100644 new mode 100755 diff --git a/build/scripts/headphones.sh b/build/scripts/headphones.sh old mode 100644 new mode 100755 diff --git a/build/scripts/init.sh b/build/scripts/init.sh old mode 100644 new mode 100755 diff --git a/build/scripts/lighttpd-php.sh b/build/scripts/lighttpd-php.sh old mode 100644 new mode 100755 diff --git a/build/scripts/lighttpd.sh b/build/scripts/lighttpd.sh old mode 100644 new mode 100755 index 2f905d3..1f9520a --- a/build/scripts/lighttpd.sh +++ b/build/scripts/lighttpd.sh @@ -5,14 +5,11 @@ set -x ## Environment export_env LIGHTTPD_VERSION_MAJOR 1.4 -export_env LIGHTTPD_VERSION_MINOR 35 +export_env LIGHTTPD_VERSION_MINOR 39 export_env LIGHTTPD_VERSION $LIGHTTPD_VERSION_MAJOR.$LIGHTTPD_VERSION_MINOR export_env LIGHTTPD_CONFIG /etc/lighttpd/lighttpd.conf export_env LIGHTTPD_LOG /host/var/log/lighttpd/error.log -## SSL -apt_install_permanent libssl-dev - ## Lighthttpd apt_install_permanent lighttpd apt-get build-dep -y lighttpd diff --git a/build/scripts/minidlna.sh b/build/scripts/minidlna.sh old mode 100644 new mode 100755 diff --git a/build/scripts/mysql.sh b/build/scripts/mysql.sh old mode 100644 new mode 100755 diff --git a/build/scripts/php.sh b/build/scripts/php.sh old mode 100644 new mode 100755 index aa458e1..5bc8922 --- a/build/scripts/php.sh +++ b/build/scripts/php.sh @@ -4,16 +4,17 @@ source /build/config set -x ## Environment -export_env PHP_VERSION 5.6.4 +export_env PHP_VERSION 5.6.20 export_env PHP_CONFIG /usr/local/lib/php.ini -export_env PHP_TIMEZONE Europe/Amsterdam +export_env PHP_TIMEZONE Europe/London + +## Dependencies +apt_install_permanent libxml2-dev libcurl4-openssl-dev libbz2-dev libjpeg-dev libpng12-dev libmcrypt-dev libssl-dev pkg-config ## PHP -apt_install_temporary gcc make cd /opt -apt_install_permanent libxml2-dev libcurl4-openssl-dev libbz2-dev libjpeg-dev libpng12-dev libmcrypt-dev -wget http://uk1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz && \ -tar xzf php-$PHP_VERSION.tar.gz && \ +wget http://uk1.php.net/get/php-$PHP_VERSION.tar.gz/from/this/mirror -O php-$PHP_VERSION.tar.gz +tar xzf php-$PHP_VERSION.tar.gz cd php-$PHP_VERSION ./configure --enable-calendar --enable-bcmath --with-bz2 --enable-ctype --without-gdbm --with-iconv --enable-exif --enable-ftp --with-gettext --enable-mbstring --enable-sockets --with-zlib --enable-soap --enable-zip --with-mhash --with-curl --with-gd --with-mysql --with-jpeg-dir --with-openssl --with-mysqli --with-mcrypt make @@ -29,4 +30,4 @@ fi ## Configuration cp /opt/php-$PHP_VERSION/php.ini-production $PHP_CONFIG sed -i "s,^;\(date\.timezone\s*=\s*\)$,\1 $PHP_TIMEZONE," $PHP_CONFIG -ln -s /usr/local/bin/php-cgi /usr/bin/php-cgi \ No newline at end of file +ln -s /usr/local/bin/php-cgi /usr/bin/php-cgi diff --git a/build/scripts/phpmyadmin.sh b/build/scripts/phpmyadmin.sh old mode 100644 new mode 100755 index c77bb7f..ba9f9b7 --- a/build/scripts/phpmyadmin.sh +++ b/build/scripts/phpmyadmin.sh @@ -4,14 +4,15 @@ source /build/config set -x ## phpMyAdmin -export_env PMA_VERSION 4.5.3.1 -export_env PMA_CONFIG /var/www/config.inc.php +export_env PMA_VERSION 4.6.0 +export_env PMA_ROOT /var/www/html +export_env PMA_CONFIG $PMA_ROOT/config.inc.php cd /opt wget https://files.phpmyadmin.net/phpMyAdmin/$PMA_VERSION/phpMyAdmin-$PMA_VERSION-all-languages.tar.gz tar xzf phpMyAdmin-$PMA_VERSION-all-languages.tar.gz phpMyAdmin-$PMA_VERSION-all-languages mv phpMyAdmin-$PMA_VERSION-*/ phpMyAdmin-$PMA_VERSION/ -rm -r /var/www -ln -s /opt/phpMyAdmin-$PMA_VERSION /var/www +rm -r $PMA_ROOT/../* +ln -s /opt/phpMyAdmin-$PMA_VERSION $PMA_ROOT ## Remove installation files if [ $MODE == "minimal" ]; then diff --git a/build/scripts/prepare.sh b/build/scripts/prepare.sh old mode 100644 new mode 100755 index 76d061c..6a3c3be --- a/build/scripts/prepare.sh +++ b/build/scripts/prepare.sh @@ -15,9 +15,8 @@ echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/02apt-speedup ## http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=594189 export_env INITRD no -## Enable Ubuntu Universe and Multiverse. -sed -i 's/^#\s*\(deb.*universe\)$/\1/g' /etc/apt/sources.list -sed -i 's/^#\s*\(deb.*multiverse\)$/\1/g' /etc/apt/sources.list +## Enable sources in APT +echo 'deb-src http://httpredir.debian.org/debian/ jessie main' >> /etc/apt/sources.list apt update ## Fix some issues with APT packages @@ -41,7 +40,3 @@ apt_install_permanent apt-transport-https ## Upgrade all packages apt dist-upgrade -y --no-install-recommends - -## Fix locale -apt_install_permanent language-pack-en -locale-gen en_US \ No newline at end of file diff --git a/build/scripts/pulseaudio.sh b/build/scripts/pulseaudio.sh old mode 100644 new mode 100755 diff --git a/build/scripts/redis.sh b/build/scripts/redis.sh old mode 100644 new mode 100755 diff --git a/build/scripts/runit.sh b/build/scripts/runit.sh old mode 100644 new mode 100755 diff --git a/build/scripts/sabnzbd.sh b/build/scripts/sabnzbd.sh old mode 100644 new mode 100755 diff --git a/build/scripts/sickbeard.sh b/build/scripts/sickbeard.sh old mode 100644 new mode 100755 diff --git a/build/scripts/sonarr.sh b/build/scripts/sonarr.sh old mode 100644 new mode 100755 diff --git a/build/scripts/sshd.sh b/build/scripts/sshd.sh old mode 100644 new mode 100755 diff --git a/build/scripts/subliminal.sh b/build/scripts/subliminal.sh old mode 100644 new mode 100755 diff --git a/build/scripts/syncthing.sh b/build/scripts/syncthing.sh old mode 100644 new mode 100755 diff --git a/build/scripts/syslog.sh b/build/scripts/syslog.sh old mode 100644 new mode 100755 diff --git a/build/scripts/testing.sh b/build/scripts/testing.sh old mode 100644 new mode 100755 diff --git a/build/scripts/transmission.sh b/build/scripts/transmission.sh old mode 100644 new mode 100755 diff --git a/build/scripts/upnpproxy.sh b/build/scripts/upnpproxy.sh old mode 100644 new mode 100755 diff --git a/build/scripts/user.sh b/build/scripts/user.sh old mode 100644 new mode 100755 diff --git a/build/scripts/utilities.sh b/build/scripts/utilities.sh old mode 100644 new mode 100755 diff --git a/build/scripts/webserver.sh b/build/scripts/webserver.sh old mode 100644 new mode 100755