Skip to content

Commit 10f2bc0

Browse files
committed
Minor tweaks to the docker files.
- Legacy-Id: 10491
1 parent 979b314 commit 10f2bc0

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

docker/docker-init.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ if ! /etc/init.d/mysql status; then
2929
/etc/init.d/mysql start
3030
fi
3131

32+
# Give debian-sys-maint access, to avoid complaints later
33+
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;"
34+
3235
echo "Checking if the IETF database exists at $MYSQLDIR ..."
3336
if [ ! -d $MYSQLDIR/ietf_utf8 ]; then
3437
if [ -z "$DATADIR" ]; then
@@ -97,4 +100,4 @@ cd /home/$USER/$CWD || cd /home/$USER/
97100

98101
echo "Done!"
99102

100-
su $USER
103+
su $USER "$@"

docker/run

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ done
121121
# ----------------------------------------------------------------------
122122
# The program itself
123123

124-
125124
if [ "$(uname)" != "Linux" ]; then
126125
if [ -n "$(type -p boot2docker)" ]; then
127126
machine=$(type -p boot2docker)
@@ -197,12 +196,12 @@ if [ -z "$MYSQLDIR" ]; then
197196
docker run -ti -p $PORT:8000 -v $HOME:/home/$WHO \
198197
-e USER=$WHO -e DATADIR=${parent#$HOME/}/data -e CWD=${PWD#$HOME/} \
199198
-e TAG=$TAG -e FILEDIR=${FILEDIR#$HOME} \
200-
$REPO:$TAG
199+
$REPO:$TAG "$@"
201200
else
202201
docker run -ti -p $PORT:8000 -v $HOME:/home/$WHO -v $MYSQLDIR:/var/lib/mysql\
203202
-e USER=$WHO -e DATADIR=${parent#$HOME/}/data -e CWD=${PWD#$HOME/} \
204203
-e TAG=$TAG -e FILEDIR=${FILEDIR#$HOME} \
205-
$REPO:$TAG
204+
$REPO:$TAG "$@"
206205
fi
207206

208207
echo ""

0 commit comments

Comments
 (0)