Improved standalone launch script (#4805)

* use the nightly image by default

* create a test action

* better readme

* Update core/standalone/README.md
diff --git a/core/standalone/README.md b/core/standalone/README.md
index ff19351..d21260a 100644
--- a/core/standalone/README.md
+++ b/core/standalone/README.md
@@ -392,15 +392,21 @@
 
 `bash <(curl -sL https://s.apache.org/openwhisk.sh)`
 
+The script will start the standalone controller with Docker, and will also try to open the playground. It was tested on Linux, OSX and Windows with Git Bash. If a browser does not automatically open the OpenWhisk playground, you can access it at `http://localhost:3232`.
+
+The default standalone controller image is published as `openwhisk/standalone:nightly` for convenience.
+
+You can specify a different image to this script and also pass additional parameters to Docker. The general format is:
+
+`bash <(curl -sL https://s.apache.org/openwhisk.sh) [<image-name>] [<additional-docker-parameters>...]`
+
 If you do not want to execute arbitrary code straight from the net, you can look at [this script](start.sh), check it and run it when you feel safe.
 
-The script will start the standalone controller with Docker, and will also try to open the playground. It was tested on Linux, OSX and Windows with Git Bash. If a browser does not open with playground, access it at `http://localhost:3232`.
-
-You can then install the [wsk CLI](https://github.com/apache/openwhisk-cli/releases) and retrieve the command line to configure `wsk` with:
+If the playground is not enough, you can then install the [wsk CLI](https://github.com/apache/openwhisk-cli/releases) and retrieve the command line to configure `wsk` with:
 
 `docker logs openwhisk | grep 'wsk property'`
 
-To properly shut down OpenWhisk and containers it creates, use [this script](stop.sh) or run the command:
+To properly shut down OpenWhisk and any additional containers it has created, use [this script](stop.sh) or run the command:
 
 `docker exec openwhisk stop`
 
@@ -414,7 +420,6 @@
 
 You can also set additional environment variables for each container running actions invoked by OpenWhisk by setting `CONTAINER_EXTRA_ENV`. For example, setting `-e CONTAINER_EXTRA_ENV=__OW_DEBUG_PORT=8081` enables debugging for those images supporting starting the action under a debugger, like the typescript runtime.
 
-
 [1]: https://github.com/apache/incubator-openwhisk/blob/master/docs/cli.md
 [2]: https://github.com/apache/incubator-openwhisk/blob/master/docs/samples.md
 [3]: https://github.com/apache/incubator-openwhisk-apigateway
diff --git a/core/standalone/start.sh b/core/standalone/start.sh
index c81ec76..ee83b7e 100755
--- a/core/standalone/start.sh
+++ b/core/standalone/start.sh
@@ -15,13 +15,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-USER="${1:-openwhisk}"
+IMAGE="${1:-openwhisk/standalone:nightly}"
 shift
 docker run --rm -d \
   -h openwhisk --name openwhisk \
   -p 3233:3233 -p 3232:3232 \
   -v //var/run/docker.sock:/var/run/docker.sock \
- $USER/standalone "$@"
+ "$IMAGE" "$@"
 docker exec openwhisk waitready
 case "$(uname)" in
  (Linux) xdg-open http://localhost:3232 ;;
diff --git a/core/standalone/waitready b/core/standalone/waitready
index 78c876f..643d537 100755
--- a/core/standalone/waitready
+++ b/core/standalone/waitready
@@ -20,3 +20,8 @@
 until wsk action list 2>/dev/null >/dev/null
 do sleep 1 ; echo server still not ready - retrying
 done
+wsk action update testme <(echo 'function main(){return {"ready":true}}') --kind nodejs:10
+until wsk action invoke testme -r 2>/dev/null | grep 'ready'
+do sleep 1 ; echo server initializing... 
+done
+wsk action delete testme