Support docker for mac using the 'local' environment (#2686)
diff --git a/core/php7.1Action/Dockerfile b/core/php7.1Action/Dockerfile
index a37ed52..f3cd93f 100644
--- a/core/php7.1Action/Dockerfile
+++ b/core/php7.1Action/Dockerfile
@@ -46,5 +46,5 @@
COPY runner.php /action
# Run webserver on port 8080
-EXPOSE 8080
+
CMD [ "php", "-S", "0.0.0.0:8080", "-d", "expose_php=0", "-d", "html_errors=0", "-d", "error_reporting=E_ALL", "/action/router.php" ]
diff --git a/tests/src/test/scala/actionContainers/ActionContainer.scala b/tests/src/test/scala/actionContainers/ActionContainer.scala
index 63da8c7..f60cbfe 100644
--- a/tests/src/test/scala/actionContainers/ActionContainer.scala
+++ b/tests/src/test/scala/actionContainers/ActionContainer.scala
@@ -90,7 +90,9 @@
}
private lazy val dockerCmd: String = {
- val hostStr = if (WhiskProperties.onMacOSX()) {
+ val version = WhiskProperties.getProperty("whisk.version.name")
+ // Check if we are running on docker-machine env.
+ val hostStr = if (version.toLowerCase().contains("mac")) {
s" --host tcp://${WhiskProperties.getMainDockerEndpoint()} "
} else {
" "