File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -209,3 +209,10 @@ following command:
209209```
210210 npm install
211211```
212+
213+ ## Build mocha-test image using a different Dockefile
214+
215+ ``` bash
216+ MOCHA_DOCKER_FILE=\l ocation\o f\m y\D ockerfile ./run-suites.sh
217+ ```
218+
Original file line number Diff line number Diff line change @@ -128,11 +128,15 @@ init_suite() {
128128}
129129
130130build_mocha_image () {
131- begin " Ensuring mocha-test image ..."
131+ DOCKER_BUILD_ARGS=" "
132+ if [[ -n " $MOCHA_DOCKER_FILE " ]]; then
133+ DOCKER_BUILD_ARGS=" -f $MOCHA_DOCKER_FILE "
134+ fi
135+ begin " Ensuring mocha-test image ($DOCKER_BUILD_ARGS ) ..."
132136 tag=($( md5sum $SELENIUM_ROOT_FOLDER /package.json) )
133137 print " > tag : $tag "
134138 if [[ $( docker images -q mocha-test:$tag 2> /dev/null) == " " ]]; then
135- docker build -t mocha-test:$tag --target test $SELENIUM_ROOT_FOLDER
139+ docker build $DOCKER_BUILD_ARGS -t mocha-test:$tag --target test $SELENIUM_ROOT_FOLDER
136140 print " > Built docker image mocha-test:$tag "
137141 fi
138142 end " mocha-test image exists"
You can’t perform that action at this time.
0 commit comments