Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to push image to docker.pkg.github.com #148

Closed
avgur opened this issue Oct 1, 2020 · 6 comments
Closed

Unable to push image to docker.pkg.github.com #148

avgur opened this issue Oct 1, 2020 · 6 comments

Comments

@avgur
Copy link

avgur commented Oct 1, 2020

Error occurred while trying to push built image into docker.pkg.github.com

Behaviour

When using 'push' option with docker.pkg.github.com error occured, in the same time it is still possible to build with 'load' option and then manually push each tag into docker.pkg.github.com

Steps to reproduce this issue

  1. prepeare any dockerfile
  2. use docker/build-push-action@v2 with 'push: true' option and tags prefixed with 'docker.pkg.github.com' f.e. 'tags: docker.pkg.github.com/repo/imagename:latest'
  3. run action

Expected behaviour

image pushed into repository

Actual behaviour

action fails with an error:

failed to solve: rpc error: code = Unknown desc = failed commit on ref "layer-sha256:4766...": invalid content digest in response: invalid checksum digest format

Configuration

name: ci

on:
  push:
    branches: master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Prepare
        id: prep
        run: |
          DOCKER_REGISTRY=docker.pkg.github.com
          DOCKER_IMAGE="${DOCKER_REGISTRY}/${GITHUB_REPOSITORY}/sample"
          DOCKER_TAGS="${DOCKER_IMAGE}:latest,${DOCKER_IMAGE}:1.0.0"
          echo ::set-output name=docker_registry::${DOCKER_REGISTRY}
          echo ::set-output name=docker_tags::${DOCKER_TAGS}     
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      -
        name: Login to docker registry
        uses: docker/login-action@v1 
        with:
          registry: ${{ steps.prep.outputs.docker_registry }}
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
      -
        name: Build final image and push
        uses: docker/build-push-action@v2
        with:
          push: true
          tags: ${{ steps.prep.outputs.docker_tags }}
@avgur
Copy link
Author

avgur commented Oct 1, 2020

In case local repository usage (like proposed in test documentation) everything works like a charm. In the time in case i will try to use "load: true" option (that way i have to switch 'push:false') i will also be able to push my images using normal docker push command

@avgur
Copy link
Author

avgur commented Oct 1, 2020

In case of several tags current error:
failed to solve: rpc error: code = Unknown desc = failed commit on ref "config-sha256:8a7a...": invalid content digest in response: invalid checksum digest format

In case of single tag the error:
failed to solve: rpc error: code = Unknown desc = failed commit on ref "layer-sha256:9045...": no response

@crazy-max
Copy link
Member

@avgur This is a common issue (#127) with the deprecated GitHub Packages Docker Registry (aka docker.pkg.github.com). I suggest to migrate to GitHub Container Registry instead.

@Fantaztig
Copy link

Is there a solution to this problem available for people using GitHub Enterprise Server?
They didn't manage to release the improved container registry so far...

@ygini
Copy link

ygini commented Jan 23, 2023

@Fantaztig same issue here, did you find a solution?

We are GH Enterprise Server new users and moving our workflow from open GH to it, and stuck in a simple docker creation image process…

@jesperbagge
Copy link

@crazy-max same issue here. Is there a solution for those of us on GitHub Enterprise Server?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants