chetanmeh edited a comment on issue #4516: Openwhisk in a standalone runnable 
jar
URL: 
https://github.com/apache/incubator-openwhisk/pull/4516#issuecomment-505384473
 
 
   @neerajmangal Thanks for reporting the details. I have now introduced a new 
`StandaloneDockerContainerFactory` which would now do couple of things
   
   1. Instantiate an OS specific `DockerClient` implementation which takes care 
of any OS specific quirks related to launching Docker container
   2. It would also do a pull for images which are considered to be provided by 
OpenWhisk. This info would be cached such that for subsequent calls no pull 
call is made
   
   I tested it locally by first purging all nodejs runtimes
   
   ```bash
   docker rmi $(docker images --filter=reference='openwhisk/*node*' -q)
   ```
   
   Then post startup I can see in logs that pull is performed
   
   ```
   [2019-06-25T15:45:12.404Z] [INFO] [#tid_sid_unknown] [ExtendedDockerClient] 
Detected docker client version 18.09.2
   [2019-06-25T15:45:12.483Z] [INFO] [#tid_sid_invokerWarmup] 
[DockerForMacClient] running /usr/local/bin/docker pull 
openwhisk/action-nodejs-v10:latest (timeout: 10 minutes) 
[marker:invoker_docker.pull_start:2294]
   [2019-06-25T15:45:12.483Z] [INFO] [#tid_sid_invokerWarmup] 
[DockerForMacClient] running /usr/local/bin/docker pull 
openwhisk/action-nodejs-v10:latest (timeout: 10 minutes) 
[marker:invoker_docker.pull_start:2294]
   [2019-06-25T15:45:12.942Z] [INFO] [#tid_sid_controller] [ActionsApi] 
actionSequenceLimit '50'
   [2019-06-25T15:45:52.378Z] [INFO] [#tid_sid_invokerWarmup] 
[DockerForMacClient]  [marker:invoker_docker.pull_finish:42189:39895]
   [2019-06-25T15:45:52.379Z] [INFO] [#tid_sid_invokerWarmup] 
[DockerForMacClient]  [marker:invoker_docker.pull_finish:42189:39895]
   [2019-06-25T15:45:52.380Z] [INFO] [#tid_sid_unknown] 
[StandaloneDockerContainerFactory] Pulled OpenWhisk provided image 
wsk0_2_prewarm_nodejs10
   [2019-06-25T15:45:52.380Z] [INFO] [#tid_sid_unknown] 
[StandaloneDockerContainerFactory] Pulled OpenWhisk provided image 
wsk0_1_prewarm_nodejs10
   [2019-06-25T15:45:52.450Z] [INFO] [#tid_sid_invokerWarmup] 
[DockerForMacClient] running /usr/local/bin/docker run -d -p 0:8080 
--cpu-shares 256 --memory 256m --memory-swap 256m --network bridge -e 
__OW_API_HOST=http://host.docker.internal:3233 --name wsk0_2_prewarm_nodejs10 
--cap-drop NET_RAW --cap-drop NET_ADMIN --ulimit nofile=1024:1024 --pids-limit 
1024 --log-driver json-file openwhisk/action-nodejs-v10:latest (timeout: 1 
minute) [marker:invoker_docker.run_start:42261]
   [2019-06-25T15:45:52.450Z] [INFO] [#tid_sid_invokerWarmup] 
[DockerForMacClient] running /usr/local/bin/docker run -d -p 0:8080 
--cpu-shares 256 --memory 256m --memory-swap 256m --network bridge -e 
__OW_API_HOST=http://host.docker.internal:3233 --name wsk0_1_prewarm_nodejs10 
--cap-drop NET_RAW --cap-drop NET_ADMIN --ulimit nofile=1024:1024 --pids-limit 
1024 --log-driver json-file openwhisk/action-nodejs-v10:latest (timeout: 1 
minute) [marker:invoker_docker.run_start:42261]
   [2019-06-25T15:45:53.389Z] [INFO] [#tid_sid_invokerWarmup] 
[DockerForMacClient]  [marker:invoker_docker.run_finish:43201:940]
   ```
   
   With this I hope we should be able to work fine on those setups where the 
required runtime image does not preexists. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to