Combine with files from virtual working directory

This commit is contained in:
2014-12-18 12:18:17 +00:00
parent 25a6f48597
commit 41761f6043
60 changed files with 1436 additions and 1 deletions

19
images/base/bin/app Normal file
View File

@@ -0,0 +1,19 @@
ARGS="-v /root/.config/pulse:/root/.config/pulse"
DIR=`dirname $0`
DIR=`readlink -e $DIR`
BASE=`basename $DIR`
IFS='/' read -ra ADDR <<< "$DIR"
CONTAINER=${ADDR[-2]}
while : ; do
ID=`docker ps --no-trunc | grep $CONTAINER: | cut -d' ' -f1`
if [ -n "$ID" ]; then
break
fi
if [ ! -n "$STARTED" ]; then
echo "Starting container."
/opt/docker/bin/run $CONTAINER &
STARTED=yes
sleep 10
fi
done
/opt/docker/bin/ssh $CONTAINER $1 "source .profile; /opt/$CONTAINER"