Minor tweaks to the docker files.

- Legacy-Id: 10491
This commit is contained in:
Henrik Levkowetz 2015-11-15 16:18:22 +00:00
parent 979b314462
commit 10f2bc053d
2 changed files with 6 additions and 4 deletions

View file

@ -29,6 +29,9 @@ if ! /etc/init.d/mysql status; then
/etc/init.d/mysql start
fi
# Give debian-sys-maint access, to avoid complaints later
mysql mysql <<< "GRANT ALL PRIVILEGES on *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY '$(awk '/^password/ {print $3; exit}' /etc/mysql/debian.cnf )' WITH GRANT OPTION; FLUSH PRIVILEGES;"
echo "Checking if the IETF database exists at $MYSQLDIR ..."
if [ ! -d $MYSQLDIR/ietf_utf8 ]; then
if [ -z "$DATADIR" ]; then
@ -97,4 +100,4 @@ cd /home/$USER/$CWD || cd /home/$USER/
echo "Done!"
su $USER
su $USER "$@"

View file

@ -121,7 +121,6 @@ done
# ----------------------------------------------------------------------
# The program itself
if [ "$(uname)" != "Linux" ]; then
if [ -n "$(type -p boot2docker)" ]; then
machine=$(type -p boot2docker)
@ -197,12 +196,12 @@ if [ -z "$MYSQLDIR" ]; then
docker run -ti -p $PORT:8000 -v $HOME:/home/$WHO \
-e USER=$WHO -e DATADIR=${parent#$HOME/}/data -e CWD=${PWD#$HOME/} \
-e TAG=$TAG -e FILEDIR=${FILEDIR#$HOME} \
$REPO:$TAG
$REPO:$TAG "$@"
else
docker run -ti -p $PORT:8000 -v $HOME:/home/$WHO -v $MYSQLDIR:/var/lib/mysql\
-e USER=$WHO -e DATADIR=${parent#$HOME/}/data -e CWD=${PWD#$HOME/} \
-e TAG=$TAG -e FILEDIR=${FILEDIR#$HOME} \
$REPO:$TAG
$REPO:$TAG "$@"
fi
echo ""