Our CI/CD processes (see .brigade/brigade.ts) build multi-arch Docker images using "Docker in Docker." The primary container for each job runs the Docker client while the Docker server runs in a sidecar.
Currently, the image build processes use a sleep before proceeding with a docker buildx ... This allows the sidecar a grace period to start before the build proceeds. Often this delays builds longer than necessary. Sometimes it leads to failures because resource demand in the cluster meant the Docker server in the sidecar was slow to start.
This issue suggests modifying the process to wait only as long as needed (up to some limit -- 90 seconds maybe) for port 2375 to actually start accepting requests.
Some very small amount of research will be required on how best to achieve, this, but it is easily accomplished with nc or even pure bash.
Note: Several other repos in the @brigadecore org would benefit from a similar change.
Our CI/CD processes (see
.brigade/brigade.ts) build multi-arch Docker images using "Docker in Docker." The primary container for each job runs the Docker client while the Docker server runs in a sidecar.Currently, the image build processes use a
sleepbefore proceeding with adocker buildx ...This allows the sidecar a grace period to start before the build proceeds. Often this delays builds longer than necessary. Sometimes it leads to failures because resource demand in the cluster meant the Docker server in the sidecar was slow to start.This issue suggests modifying the process to wait only as long as needed (up to some limit -- 90 seconds maybe) for port 2375 to actually start accepting requests.
Some very small amount of research will be required on how best to achieve, this, but it is easily accomplished with
ncor even pure bash.Note: Several other repos in the @brigadecore org would benefit from a similar change.