Open TheDarkula opened 2 months ago
Can you try logout from docker and login again? Could you also try to upgrade docker's version?
@lunny This is from a Gitea Actions Runner, so it logs in on every run. Is there some configuration setting that limits/sets the maximum docker image size?
No limitation by default. Can you list the images you try to upload?
Examples that fail:
I cannot reproduce this problem in my local machine with main branch. Can you upgrade to v1.22.2 and try again?
I just upgraded gitea to v1.22.2
and upgraded the act_runner to 0.2.11-dind-rootless
, but the issue is still happening.
I just tried with ollama/ollama:0.3.12
, and I see this in the logs:
2024/10/07 08:20:40 ...eb/routing/logger.go:68:func1() [W] router: slow PATCH /v2/username/ollama/ollama/blobs/uploads/kvr9kfbso38cq77ddkghylcbl for 10.0.0.67:0, elapsed 3088.0ms @ packages/api.go:700(packages.ContainerRoutes.func2.2)
2024/10/07 08:21:37 ...ntainer/container.go:92:apiError() [E] unexpected EOF
2024/10/07 08:21:37 ...eb/routing/logger.go:102:func1() [I] router: completed PATCH /v2/username/ollama/ollama/blobs/uploads/kvr9kfbso38cq77ddkghylcbl for 10.0.0.67:0, 500 Internal Server Error in 60000.5ms @ packages/api.go:700(packages.ContainerRoutes.func2.2)
Can you paste your related workflow file?
Sure thing!
This is the workflow:
name: Push Docker Images
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_URL }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Run Images Script
env:
REGISTRY_URL: ${{ vars.REGISTRY_URL }}
REGISTRY_OWNER: ${{ vars.REGISTRY_OWNER }}
run: bash download-images-retag-and-push.sh
And here is the respective script
#!/bin/bash
set -eu
cat image_list.conf | while read image_name_and_tag || [ -n "$image_name_and_tag" ];
do
if [[ "$image_name_and_tag" == \#* ]]; then
echo "Skipping comment."
else
FULL_IMAGE_URL="$REGISTRY_URL/$REGISTRY_OWNER/$image_name_and_tag"
set +e
docker manifest inspect "$FULL_IMAGE_URL" > /dev/null
EXIT_CODE=$?
set -e
if [ "$EXIT_CODE" -eq 0 ]; then
echo "$FULL_IMAGE_URL already exists exists in the registry, skipping"
else
echo "$FULL_IMAGE_URL does not exist in the registry."
docker images
echo "Pulling image: $image_name_and_tag"
docker pull "$image_name_and_tag"
echo "Retagging image: $image_name_and_tag to: $FULL_IMAGE_URL"
echo "New image tag: $FULL_IMAGE_URL"
docker tag "$image_name_and_tag" "$FULL_IMAGE_URL"
echo "Removing original image: $image_name_and_tag"
docker rmi "$image_name_and_tag"
echo "Pushing new image: $FULL_IMAGE_URL"
docker push "$FULL_IMAGE_URL"
fi
fi
done
You will need a file called image_list.conf
with an image in it like we discussed:
ollama/ollama:0.3.12
Also, you will need two environment variables set in the repository:
Description
I have a Gitea action that pulls docker images and pushes them to the Gitea registry.
On some images, the push does not succeed.
The actions job shows this:
I also have these errors in the Gitea logs:
Gitea Version
1.22.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Linux
How are you running Gitea?
I have Gitea and the ACT Runner running in kubernetes.
Database
PostgreSQL