Skip to content

Commit 1804510

Browse files
committed
Improve robustness
1 parent df55684 commit 1804510

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docker/run.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ select f in "${options[@]}"; do
1616
exit
1717
fi
1818
done
19-
dir=$(pwd)/..
19+
dir=$(dirname $0)
20+
dir=$(readlink -f $dir)
21+
dir=$(dirname $dir)
2022
docker rm "php-crud-api_$f" > /dev/null 2>&1
2123
docker run -ti -v $dir:/php-crud-api --name "php-crud-api_$f" "php-crud-api:$f" /bin/bash -c '/usr/sbin/docker-run && cd php-crud-api && /bin/bash'
24+

0 commit comments

Comments
 (0)