Docker buildx Error : rpc error: code = Unknown desc = server message: insufficient_scope: authorization failed

  buildx, continuous-integration, docker, github-actions

I’m new to Docker and trying to perform CI using GitHub Actions.

Here’s my .yml file on GitHub.

name: CI to Docker Hub
on:
 push:
   branches: [main]
 pull_request:
   branches: [main]

jobs:
 build:

  runs-on: ubuntu-latest

   steps:
  - name: Check Out Repo
    uses: actions/[email protected]

  - name: Login to Docker Hub
    uses: docker/[email protected]
    with:
      username: ${{ secrets.DOCKER_HUB_USERNAME }}
      password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

  - name: Set up Docker Buildx
    id: buildx
    uses: docker/[email protected]

  - name: Build and push
    id: docker_build
    uses: docker/[email protected]
    with:
      context: .
      file: ./Dockerfile
      push: true
      tags: your-order-backend:latest

  - name: Image digest
    run: echo ${{ steps.docker_build.outputs.digest }}

I have added Secrets in my Github too of Docker Hub.
I’m not sure why, but it is failing at > exporting to image:

enter image description here

Source: Docker Questions

LEAVE A COMMENT