Skip to content

CI/CD: Wait for Docker port to be open #1932

Description

@krancour

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions