diff --git a/dev/docker/build.bat b/dev/docker/build.bat index ca69012a..b3115b33 100644 --- a/dev/docker/build.bat +++ b/dev/docker/build.bat @@ -1,3 +1,4 @@ +cd %~dp0 copy ..\..\requirements.txt . docker build -t chaos . del requirements.txt diff --git a/dev/docker/build.sh b/dev/docker/build.sh index b4bc46a6..ae47c0dc 100755 --- a/dev/docker/build.sh +++ b/dev/docker/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +cd "$(dirname "$0")" + while getopts ":rpi:" opt; do case $opt in \?) diff --git a/dev/docker/run.bat b/dev/docker/run.bat index 18db7ea8..7ca3105d 100644 --- a/dev/docker/run.bat +++ b/dev/docker/run.bat @@ -1,2 +1,2 @@ -cd ..\..\ +cd %~dp0\..\..\ docker run -it --rm -v %cd%:/root/workspace/Chaos -p 8082:80 -p 8081:8081 chaos bash /root/workspace/Chaos/dev/docker/start_services.sh diff --git a/dev/docker/run.sh b/dev/docker/run.sh index 4f2c7197..0902cd25 100755 --- a/dev/docker/run.sh +++ b/dev/docker/run.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "$(dirname "$0")" docker run -it --rm\ -v $(cd ../../; pwd):/root/workspace/Chaos\ -p 8082:80\ diff --git a/dev/docker/test.bat b/dev/docker/test.bat index 19ffc46b..d6998740 100644 --- a/dev/docker/test.bat +++ b/dev/docker/test.bat @@ -1,2 +1,2 @@ -cd ..\..\ +cd %~dp0\..\..\ docker run -it --rm -v %cd%:/root/workspace/Chaos -p 8082:80 -p 8081:8081 chaos bash /root/workspace/Chaos/dev/docker/start_tests.sh diff --git a/dev/docker/test.sh b/dev/docker/test.sh index 32232325..277fd462 100755 --- a/dev/docker/test.sh +++ b/dev/docker/test.sh @@ -1,4 +1,5 @@ #!/bin/bash +cd "$(dirname "$0")" docker run -it --rm\ -v $(cd ../../; pwd):/root/workspace/Chaos\ -p 8082:80\