docker / build-push-action

GitHub Action to build and push Docker images with Buildx
https://github.com/marketplace/actions/build-and-push-docker-images
Apache License 2.0
4.11k stars 526 forks source link

net/http: TLS handshake timeout #1065

Closed tgajdo closed 4 months ago

tgajdo commented 4 months ago

Contributing guidelines

I've found a bug, and:

Description

This action time to time fails with "net/http: TLS handshake timeout" without any reason. On subsequent re-runs without any change it passes. I'm using ARC on local hosted Kubernetes.

Expected behaviour

Always be able to push images.

Actual behaviour

For almost every first run the push action fails with timeout.

Repository URL

No response

Workflow run URL

No response

YAML workflow

- name: Build and push
        uses: docker/build-push-action@v5
        with:
          push: true
          tags: ghcr.io/${{ github.repository }}:${{ env.NEXT_VERSION }}
          context: .
          file: ./Dockerfile
          target: production
          labels: |
            org.opencontainers.image.title=${{ github.event.repository.name }}
            org.opencontainers.image.source=https://github.com/${{ github.repository }}
            org.opencontainers.image.version=${{ env.NEXT_VERSION }}
            org.opencontainers.image.created=${{ steps.semvers.outputs.date }}

Workflow logs

ERROR: failed to solve: failed to push ghcr.io/***/***:0.3.7: failed to do request: Head "https://ghcr.io/v2/***/***/blobs/sha256:***": net/http: TLS handshake timeout
Error: buildx failed with: ERROR: failed to solve: failed to push ghcr.io/***/***:0.3.7: failed to do request: Head "https://ghcr.io/v2/***/***/blobs/sha256:***": net/http: TLS handshake timeout

BuildKit logs

No response

Additional info

No response

crazy-max commented 4 months ago

This action time to time fails with "net/http: TLS handshake timeout" without any reason.

ERROR: failed to solve: failed to push ghcr.io/***/***:0.3.7: failed to do request: Head "https://ghcr.io/v2/***/***/blobs/sha256:***": net/http: TLS handshake timeout

This is not the action but an issue with the remote registry you're pushing to which we don't control so nothing much we can do about it, sorry. This is similar to https://github.com/docker/build-push-action/issues/251 and https://github.com/docker/build-push-action/issues/975. Suggest to contact GitHub support: https://docs.github.com/en/support/contacting-github-support/creating-a-support-ticket.