balena-io-modules / balena-preload

Script for preloading containers onto balena device images
https://www.balena.io/
Apache License 2.0
35 stars 8 forks source link

65 second delay #263

Closed maggie44 closed 3 years ago

maggie44 commented 3 years ago

After the message Building Docker preloader image preloader via the CLI hangs for 65 seconds without any notification. Ideally it wouldn’t need to build an image on every run and could have it stored pre-built (or pulled) speeding up the process considerably, or at least a notification that it’s still running.

maggie44 commented 3 years ago

Well there we go: https://github.com/balena-io-modules/balena-preload/pull/252/files

:)

klutchell commented 3 years ago

Hey @maggie0002 , thanks for bringing this up!

We are working on a few changes to improve the preload times and I see you've already found one that will save us the docker build steps by pulling a completed image. We would also like to add an indication while the image is being pulled so hopefully the experience is smoother soon!

maggie44 commented 3 years ago

Thanks for the response.

May I ask, why is it that it opts to use DIND rather than mounting the docker socket? Is the version control particularly important?

klutchell commented 3 years ago

We require that the path to the image file be the same from both the perspective of the docker host, and the running directory of the CLI.

So if we weren't using DinD we would need to map volumes in a manner that made the path to the image appear identical, and that doesn't work well on Docker Desktop for Windows.