Cannot build app tarballs in a docker container

Ported from ticket

We have an app that builds fine on a pristine machine with docker installed. Our build system, however, runs the same commands in a docker container (we use gravitational/debian-grande for this build) mounting the docker socket from the host.

The tele build command is able to download images from our internal docker repos just fine but is unable to create the local registry and register images there. This is what happens:

	Still embedding application container images (4 minutes elapsed)
time="2019-02-26T05:44:05Z" level=warning msg="No HTTP secret provided - generated random secret. This may cause problems with uploads if multiple registries are behind a load-balancer. To provide a shared secret, fill in http.secret in the configuration file or set the REGISTRY_HTTP_SECRET environment variable." source=local-docker-registry
* [3/6] Build aborted after 6 minutes 
[ERROR]: failed to push images to local registry

Check out this doc and see if it helps:

Thanks for that link. I’m pretty much doing everything in there except for running the container with host networking which I suspect makes all the difference.

yup. that was it. Thanks!