Docker Community Forums

Share and learn in the Docker community.

What would be a typical "docker run" startup time?

I am completely new to Docker, so please bear with me.

I have built the Windows image in this sample on my local machine https://docs.microsoft.com/en-us/dotnet/framework/docker/console#building-the-application The image is listed as being 11GB. When I “docker run --rm” it takes at least 20 seconds until the program displays the result. That is a very long time and am wondering how could I shorten it in a significant manner?

Running “docker events” shows that establishing the network connection consumed 20 seconds. Regretfully, I still do not know how to address the problem.

2019-03-11T14:55:10.927874000-07:00 container create cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3 (image=console-random-answer-generator, name=laughing_yonath)
2019-03-11T14:55:10.929876500-07:00 container attach cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3 (image=console-random-answer-generator, name=laughing_yonath)
2019-03-11T14:55:10.975877300-07:00 network connect 8bc812a259836cd427543d2324165e20e17f2a04892805922c4d5fc6a507956a (container=cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3, name=nat, type=nat)
2019-03-11T14:55:30.167983300-07:00 container start cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3 (image=console-random-answer-generator, name=laughing_yonath)
2019-03-11T14:55:30.425147500-07:00 container exec_create: cmd.exe /C ECHO 10.7.1.119    host.docker.internal >> %systemroot%\system32\drivers\etc\hosts & ECHO 10.7.1.119    gateway.docker.internal >> %systemroot%\system32\drivers\etc\hosts cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3 (execID=f89ac70808a980d8d9c88a87e5c26a1e748a747e21c2ada31c563df1cb1ef7a6, image=console-random-answer-generator, name=laughing_yonath)
2019-03-11T14:55:30.430160500-07:00 container exec_start: cmd.exe /C ECHO 10.7.1.119    host.docker.internal >> %systemroot%\system32\drivers\etc\hosts & ECHO 10.7.1.119    gateway.docker.internal >> %systemroot%\system32\drivers\etc\hosts cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3 (execID=f89ac70808a980d8d9c88a87e5c26a1e748a747e21c2ada31c563df1cb1ef7a6, image=console-random-answer-generator, name=laughing_yonath)
2019-03-11T14:55:33.126501000-07:00 container die cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3 (exitCode=0, image=console-random-answer-generator, name=laughing_yonath)
2019-03-11T14:55:33.165504000-07:00 network disconnect 8bc812a259836cd427543d2324165e20e17f2a04892805922c4d5fc6a507956a (container=cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3, name=nat, type=nat)
2019-03-11T14:55:33.195503000-07:00 container destroy cd137c8562641d5765c2703bbfb76232fb5d968246168ecbe39b2738dddd28e3 (image=console-random-answer-generator, name=laughing_yonath)


Running Docker’s hello-world shows a reasonable delay of < 3 seconds.

2019-03-11T16:43:27.889328900-07:00 container attach 8f426dc9675b01a1bb7aff096a90ebcb14192b297e30d88c3144d32114be4cbf (image=hello-world, name=stupefied_panini)
2019-03-11T16:43:28.035327000-07:00 network connect 8bc812a259836cd427543d2324165e20e17f2a04892805922c4d5fc6a507956a (container=8f426dc9675b01a1bb7aff096a90ebcb14192b297e30d88c3144d32114be4cbf, name=nat, type=nat)
2019-03-11T16:43:30.730157300-07:00 container start 8f426dc9675b01a1bb7aff096a90ebcb14192b297e30d88c3144d32114be4cbf (image=hello-world, name=stupefied_panini)


Thank you, eugen