Browse Source

Improve robustness

Maurits van der Schee 5 years ago
parent
commit
1804510b14
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      docker/run.sh

+ 4
- 1
docker/run.sh View File

@@ -16,6 +16,9 @@ select f in "${options[@]}"; do
16 16
 	exit
17 17
     fi
18 18
 done
19
-dir=$(pwd)/..
19
+dir=$(dirname $0)
20
+dir=$(readlink -f $dir)
21
+dir=$(dirname $dir)
20 22
 docker rm "php-crud-api_$f" > /dev/null 2>&1
21 23
 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
+

Loading…
Cancel
Save