You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/10/12 05:21:47 UTC
[GitHub] alexkli opened a new pull request #2852: invoker: use locally available image if docker pull fails
alexkli opened a new pull request #2852: invoker: use locally available image if docker pull fails
URL: https://github.com/apache/incubator-openwhisk/pull/2852
I have a local OW setup using devtools docker-compose and provide my own container via `--docker`. Currently, the invoker will always do `docker pull`, and if that fails to resolve, will fail the invocation, even if the image is available locally.
This patch will still do a `docker pull` first, to try and get the latest image, but if that fails, will check if the image is present by calling `docker inspect <image>` and check for the exit code (non-zero if image is not found). If it's not present, it will fail as before, but if present, it will continue with `docker run` (new behavior).
Beware, I am not very familiar with Scala. I feel this can probably be done better. It was just a quick proof of concept.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services