cli
cli copied to clipboard
simple fix for #405 and #406
Simple fix that uses docker inspect
to check that Docker is running and that the init-image exists.
is the pull step before this? lazy and didn't see it in the diff (sorry). users shouldn't need to manually pull the init image and docker inspect will burp if the image isn't downloaded locally (which was the point I think? got that) -- docker build itself will pull the image, i'm assuming we were just relying on that, which makes sense to me. docker info
is a quick way to check that docker is running. docker search
is a quick way to check that an image exists on a registry. I guess here we have to balance that some users may build their own init images locally and have them and some users may be relying on them to exist on a registry to be pulled at build time (like ours, presumably, eg for newer users on their first run through). do we need to try both search and inspect to get the desired validation behavior or what exactly do we need to validate here?
I changed this to simply handle docker run
potential failures.
I think that all cases are properly handled (init-image not found, docker down, docker not in path, untar failing). I couldn't make error handling fails.