You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
for line in `cd ./code ; find * -maxdepth 0 -type d`; do
username=`echo $line | awk -F '.' '{print $1}'`
dir=`echo $line | awk -F '.' '{print $2}'`
#如果dir对应一个team下的镜像
if ([ ! -z $dir ] && [ -d "./team/$dir" ] ); then
#echo "$username-$dir"
#判断fig中是否存在
if [ -z $(cat fig.yml | grep $username$dir:) ]; then
#如果不存在容器
#读取镜像的fig.yml
container_name=$username$dir;
workdir="\/codeEnv\/code\/$username.$dir"
domain=`cat ./domain`
#替换变量
fig_content=`cat ./team/www/fig.yml | sed "s/{CONTAINER_NAME}/$container_name/g" | sed "s/{WORKDIR}/$workdir/g" | sed "s/{USERNAME}/$username/g" | sed "s/{DOMAIN}/$domain/g" | sed "s/{DIR}/$dir/g"`