docker / setup-buildx-action

GitHub Action to set up Docker Buildx
https://github.com/marketplace/actions/docker-setup-buildx
Apache License 2.0
905 stars 142 forks source link

issues while publishing multi-arch docker images with build kit in GitHub action when using Artiactory as a docker registry #287

Closed harishgoudb closed 2 days ago

harishgoudb commented 6 months ago

Contributing guidelines

I've found a bug, and:

Description

issues while publishing multi-arch docker images with build kit in GitHub action when using Artiactory as a docker registry

#12 [auth] docker-buildx:pull,push token for servername-docker-virtual.jfrog.io
#12 DONE 0.0s

#11 exporting to image
#11 pushing layers 614.6s done
#11 ERROR: failed to push servername-docker-virtual.jfrog.io/docker-buildx:1.2.3: failed commit on ref "layer-sha256:1bbc11c5734e343e8bc59a5fd724b32[91](https://github.com/harishgoudb/Java-Docker/actions/runs/7240950189/job/19724513204#step:9:92)66476d74cc[92](https://github.com/harishgoudb/Java-Docker/actions/runs/7240950189/job/19724513204#step:9:93)5a2f672776b402294a4": failed to do request: Put "https://servername-docker-virtual.jfrog.io/v2/docker-buildx/blobs/uploads/ef435cec-b[93](https://github.com/harishgoudb/Java-Docker/actions/runs/7240950189/job/19724513204#step:9:94)5-422c-9d72-6adff9c0508e?digest=sha256%3A1bbc11c5734e343e8bc59a5fd724b329166476d74cc925a2f672776b4022[94](https://github.com/harishgoudb/Java-Docker/actions/runs/7240950189/job/19724513204#step:9:95)a4": read tcp 172.17.0.3:35622->3.123.220.237:443: read: connection timed out
------
 > exporting to image:
------
ERROR: failed to solve: failed to push servername-docker-virtual.jfrog.io/docker-buildx:1.2.3: failed commit on ref "layer-sha256:1bbc11c5734e343e8bc59a5fd724b329166476d74cc925a2f672776b402294a4": failed to do request: Put "https://servername-docker-virtual.jfrog.io/v2/docker-buildx/blobs/uploads/ef435cec-b935-422c-9d72-6adff9c0508e?digest=sha256%3A1bbc11c5734e343e8bc59a5fd724b329166476d74cc925a2f672776b402294a4": read tcp 172.17.0.3:35622->3.123.220.237:443: read: connection timed out

Expected behaviour

The build should be published as expected with out connectivity errros

Actual behaviour

The build should be published as expected without connectivity errors

Repository URL

No response

Workflow run URL

https://github.com/harishgoudb/Java-Docker/actions/runs/7240950189/job/19724513204

YAML workflow

name: Docker-buildx
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

on: [push, pull_request]
jobs:
  buildx:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v4
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
        env:
          JF_env:ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
      - name: Setup JFrog CLI
        run: |
          sudo apt-get -y install python3-pip
          sudo pip3 install PyGithub
          sudo pip3 install --upgrade PyGitHub
          sudo pip3 install pyyaml
          sudo pip3 install gql
          sudo apt-get install tcpdump
      - name: Setup JFrog CLI
        uses: jfrog/setup-jfrog-cli@v3.4.1
        with:
          version: 2.52.3 
        env:
          JF_env_1: ${{ secrets.HARISH_CLI_GITHUB_ACTIONS }}
      - name: Setup JFrog CLI Config
        run:
          jf c add --url=https://servername.jfrog.io --user 'xxxxxxxxx' --password --interactive=false
      - name: Docker login
        run:
          jf docker login servername-docker-virtual.jfrog.io 
      - name: buildkit
        run: |
          ACTIONS_STEP_DEBUG=
          jf docker context create docker-buildx 
          jf docker buildx create --use docker-buildx
          jf docker buildx build --platform "linux/amd64,linux/arm64" --tag "servername-docker-virtual.jfrog.io/docker-buildx:1.2.3" --push app/

Workflow logs

n/a

BuildKit logs

n/a

Additional info

n/a

crazy-max commented 2 days ago

servername-docker-virtual.jfrog.io

Seems you're using a cloud instance, we don't have any issue on our side in our e2e tests using Artifactory: https://github.com/docker/build-push-action/actions/runs/9775787017/job/26986947658#step:11:417

#40 exporting to image
#40 pushing layers 2.7s done
#40 pushing manifest for infradock.jfrog.io/test-ghaction/build-push-action:master@sha256:0dea6231c252f446f2beebc33cfffd233f6db21afe10895c33e9e7f902ff4511
#40 pushing manifest for infradock.jfrog.io/test-ghaction/build-push-action:master@sha256:0dea6231c252f446f2beebc33cfffd233f6db21afe10895c33e9e7f902ff4511 5.9s done
#40 pushing layers
#40 pushing layers 0.8s done
#40 pushing manifest for infradock.jfrog.io/test-ghaction/build-push-action:gh-runid-9775787017@sha256:0dea6231c252f446f2beebc33cfffd233f6db21afe10895c33e9e7f902ff4511
#40 pushing manifest for infradock.jfrog.io/test-ghaction/build-push-action:gh-runid-9775787017@sha256:0dea6231c252f446f2beebc33cfffd233f6db21afe10895c33e9e7f902ff4511 1.9s done
#40 DONE 11.4s

So might be an issue with your setup.

jf docker buildx create --use docker-buildx

Also not sure what jf is or does and why you need the JFrog CLI at all.

Closing this issue as current logs don't give enough details to understand your issue. Would need full workflow logs and BuildKit container logs to help you.