unknown blob error on push
Behaviour
I am using v2 build push action and have started noticing intermittent failures during docker push with an unknown blob error.
Here is part of the job:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to docker registry
uses: docker/login-action@v1
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Build image
uses: docker/build-push-action@v2
with:
context: .
push: true
file: ./Dockerfile
tags: docker.pkg.github.com/${{ github.repository }}/app:latest
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
Logs
1a4f5de7f684: Layer already exists
13545bbbc98b: Layer already exists
c67dd3decb62: Layer already exists
unknown blob
Error: exit status 1
Usage:
exit status 1
github-actions build-push [flags]
Flags:
-h, --help help for build-push
Have you tried upgrading to ghcr.io? I've been facing this issue too and after reading up on the subject a little it turns out GH are deprecating docker.pkg.github.com in favour of GitHub Container Registry, this might be useful to you.
I haven't yet figured out how to upgrade my CI pipeline but I'll reply here when I figure it out :~)
Yes upgrading to ghcr.io did resolve the issue with push. Github acknowledged there was a problem with their systems and have since resolved the issue. Haven't tested if its resolved as I'm using the newer registry now.
Yes looks like an issue with the deprecated GitHub package registry and not this action. See also https://github.com/docker/build-push-action/issues/148#issuecomment-702278002