Fix phpmyadmin installation script
This commit is contained in:
@@ -2,7 +2,7 @@ RANDOM = $(shell bash -c 'echo $$RANDOM')
|
|||||||
HOME = $(DOCKER_HOME)
|
HOME = $(DOCKER_HOME)
|
||||||
BASE = $(HOME)/build
|
BASE = $(HOME)/build
|
||||||
FILE = $(BASE)/Dockerfile
|
FILE = $(BASE)/Dockerfile
|
||||||
TMP = /opt/tmp
|
TMP = /build/tmp
|
||||||
FROM = ubuntu:trusty
|
FROM = ubuntu:trusty
|
||||||
INTERFACE = eth0
|
INTERFACE = eth0
|
||||||
MODE = normal
|
MODE = normal
|
||||||
@@ -38,14 +38,14 @@ endef
|
|||||||
all: build bin service clean
|
all: build bin service clean
|
||||||
|
|
||||||
build: prepare base
|
build: prepare base
|
||||||
|
$(call script,cleanup)
|
||||||
@echo 'RUN chmod +x /opt/init.d/*' >> ${FILE}
|
@echo 'RUN chmod +x /opt/init.d/*' >> ${FILE}
|
||||||
@echo 'CMD ["/opt/init"]' >> ${FILE}
|
@echo 'CMD ["/opt/init"]' >> ${FILE}
|
||||||
@echo ENV MODE $(MODE) >> ${FILE}
|
|
||||||
$(call script,cleanup)
|
|
||||||
@docker build -t $(NAME):$(VERSION) $(ARGS) ${BASE}
|
@docker build -t $(NAME):$(VERSION) $(ARGS) ${BASE}
|
||||||
|
|
||||||
prepare:
|
prepare:
|
||||||
@echo FROM $(FROM) > ${FILE}
|
@echo FROM $(FROM) > ${FILE}
|
||||||
|
@echo ENV MODE $(MODE) >> ${FILE}
|
||||||
$(call add,config,/build/config)
|
$(call add,config,/build/config)
|
||||||
$(call add,init,/opt/init)
|
$(call add,init,/opt/init)
|
||||||
$(call script,prepare)
|
$(call script,prepare)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
base: syslog sshd hosts
|
base: cron syslog sshd hosts
|
||||||
|
$(call script,utilities)
|
||||||
$(call script,init)
|
$(call script,init)
|
||||||
$(call script,runit)
|
$(call script,runit)
|
||||||
$(call script,logrotate)
|
$(call script,logrotate)
|
||||||
$(call script,utilities)
|
|
||||||
@@ -1 +1,32 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
source /build/config
|
||||||
|
set -x
|
||||||
|
|
||||||
|
## phpMyAdmin
|
||||||
|
export_env PMA_VERSION 4.5.2
|
||||||
|
export_env PMA_CONFIG /var/www/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
|
||||||
|
mkdir phpMyAdmin-$PMA_VERSION
|
||||||
|
mv phpMyAdmin-$PMA_VERSION-* phpMyAdmin-$PMA_VERSION
|
||||||
|
rm -r /var/www
|
||||||
|
ln -s /opt/phpMyAdmin-$PMA_VERSION /var/www
|
||||||
|
|
||||||
|
## Remove installation files
|
||||||
|
if [ $MODE == "minimal" ]; then
|
||||||
|
rm phpMyAdmin-$PMA_VERSION.tar.gz
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
cat << EOF > $PMA_CONFIG
|
||||||
|
<?php
|
||||||
|
\$cfg['blowfish_secret'] = 'random';
|
||||||
|
\$cfg['Servers'][1]['auth_type'] = 'cookie';
|
||||||
|
\$cfg['Servers'][1]['connect_type'] = 'tcp';
|
||||||
|
\$cfg['Servers'][1]['host'] = 'mysql';
|
||||||
|
\$cfg['Servers'][1]['compress'] = false;
|
||||||
|
\$cfg['Servers'][1]['extension'] = 'mysqli';
|
||||||
|
\$cfg['Servers'][1]['AllowNoPassword'] = true;
|
||||||
|
EOF
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ source /build/config
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
## Often used tools
|
## Often used tools
|
||||||
apt_get_install_permanent curl python-pip git
|
apt_get_install_permanent wget curl python-pip git
|
||||||
apt_get_install_temporary inetutils-ping telnet
|
apt_get_install_temporary inetutils-ping telnet
|
||||||
|
|
||||||
## Often used python modules
|
## Often used python modules
|
||||||
|
|||||||
Reference in New Issue
Block a user