We’re using a docker-in-docker base image, along with docker-compose to marshal all our containers, and it’s working (reasonably) well. There’s one area that I’d like to improve, specifically related to the initial build process. Right now, the core app is pushed, and build, and then when the app starts up, it kicks off a docker-compose process to actually build all the individual containers as defined within the docker-compose.yml
This has a number of disadvantages, not least of which is that one can quite easily push a “broken” app, given that the resin build process doesn’t really “know” anything about the child containers built by docker-compose. If an error creeps into one of the child containers, then that’s only obvious when the container is actually bit, which of course happens within the app itself, on the device, rather than within the builder environment.
I’ve tried running a docker-instance from within the “parent” Dockerfile itself, but the permissions assigned to the user within the build environment don’t seem to be enough to allow it.
Can anyone think of any neat tricks to allow the docker-compose build process to run within the build environment?