-
Notifications
You must be signed in to change notification settings - Fork 466
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
for gitlab registry buildx --push makes error insufficient_scope: authorization failed, docker push same image works #202
Comments
cc @dmcgowan |
I have the same problem.. |
same here, see https://github.com/viceice/docker-buildx-tests |
I just got this working, with github actions: - name: Prepare
if: success()
id: prepare
run: |
echo ::set-output name=docker_platforms::linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x
echo ::set-output name=docker_username::miigotu
echo ::set-output name=docker_image::docker.io/miigotu/sickchill
echo ::set-output name=version::${GITHUB_REF#refs/*/}
echo ::set-output name=hash::${GITHUB_SHA}
- name: Docker Login
if: success()
env:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: |
echo "${DOCKER_PASSWORD}" | docker login --username "${{ steps.prepare.outputs.docker_username }}" --password-stdin docker.io
- name: Run Buildx (master)
if: success() && contains(steps.prepare.outputs.version, 'master')
run: |
docker buildx build \
--output type=image,name=${{ steps.prepare.outputs.docker_image }},push=true \
--platform ${{ steps.prepare.outputs.docker_platforms }} \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.hash }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:latest" \
--file Dockerfile .
- name: Run Buildx (non-master)
if: success() && !contains(steps.prepare.outputs.version, 'master')
run: |
docker buildx build \
--output type=image,name=${{ steps.prepare.outputs.docker_image }},push=true \
--platform ${{ steps.prepare.outputs.docker_platforms }} \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.version }}" \
--tag "${{ steps.prepare.outputs.docker_image }}:${{ steps.prepare.outputs.hash }}" \
--file Dockerfile . https://github.com/SickChill/SickChill/actions/runs/53326996/workflow#L85 Replace the 2 instances where I have |
@iav You mind adding |
Hello! I ran into this issue using buildx on a system with Ubuntu's |
Where did |
Seems to be a host misconfiguration issue. Let us know if it still happens. |
I was having this exact same issue - turned out my image tag wasn't properly structured, I had |
@miigotu Your working solution is nice, but can you explain what are /was the exact turn points which make it work and before didn't for the docker buildx command . Thanks once again for clarifying |
All of them are in a "group", which is your username or organization that the repo is under. You can't push to gitlab's root domain. Aside from that idk what your question means? |
For me it was just an simple issue with the ~/.docker/config.json . Delete it and run |
One of my dockerfile can't be pushed to registry.gitlab.com as part of
docker buildx build -f test -t registry.gitlab.com/xxxxx --platform amd64 --push .
with errorbut same image can be pushed if builded to local registry then pushed by docker:
docker push registry.gitlab.com/xxxxxx
same time same computer other (tiny test image) can be successfuly build and pushed to gitlab directly as it should,
docker buildx build -f test -t registry.gitlab.com/iav1/musl-builder --platform linux/arm/v7,linux/arm64,amd64 --push .
How to fix that?
The text was updated successfully, but these errors were encountered: