Plugins/docker vs library/docker

Many of our steps have to do with building docker images. We originally were thinking that the plugins/docker would be the right image to use, but it we’re running into issues where the docker build can’t complete due to what appears to be network issues. Specifically, when it gets to a build step where we do a yarn install it results in There appears to be trouble with your network connection. Retrying.... If we switch to using library/docker, the build works without issue.

We are behind a proxy and https traffic is resigned with a self-signed cert (both are set during earlier docker build steps). Again, all works fine with library/docker (and a the docker.sock mounted).

Any suggestion on what might be the issue?

Did some more searching and found this item: DNS Lookup fails inside plugins/docker build. Setting the custom_dns setting to the name server addresses on the host machine resolved the issue.

this is likely because you are mounting the host machine socket, and creating containers that use the default bridge network and dns. The plugins/docker image creates a docker-in-docker container and is attached to a user-defined network. DNS lookup on bridge network and user-defined network do not work the same way.

the plugins/docker image uses library/docker as the base.