2018-10-01 19:22:17 +00:00
|
|
|
#!/bin/sh
|
|
|
|
THIS=$0
|
|
|
|
PUPY=`dirname "$0"`
|
|
|
|
PUPY=`readlink -f ${PUPY}`/pupy
|
|
|
|
WORKDIR=${1:-$HOME/pupy}
|
|
|
|
GID=${GID:-`id -g`}
|
2018-10-02 05:11:07 +00:00
|
|
|
TAG=${TAG:-"unstable"}
|
2018-10-01 19:22:17 +00:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
if [ ! -d ${WORKDIR} ]; then
|
|
|
|
mkdir -p ${WORKDIR}
|
|
|
|
fi
|
|
|
|
|
2018-10-03 09:50:44 +00:00
|
|
|
if [ ! -z "${UID}" ]; then
|
|
|
|
UID=`id -u`
|
|
|
|
fi
|
|
|
|
|
2018-10-01 19:22:17 +00:00
|
|
|
echo "[+] Workdir: ${WORKDIR} [UID=${UID} GID=${GID}]"
|
|
|
|
|
|
|
|
cd ${PUPY}
|
|
|
|
|
|
|
|
export PUPY UID GID WORKDIR TAG
|
|
|
|
docker-compose -f conf/docker-compose.yml up -d
|
|
|
|
exec docker attach pupy
|