Pulling Image via Portainer

Hi Everyone! I’m trying to pull an Image via Portainer from our gitea instance but I get
Unable to pull image: Head “http://gitea_ip:Port/v2/user/imagename/manifests/1.0”: unknown: <html><body><h1>404 Not Found</h1> The resource could not be found. </body></html>

Setup:

  • Gitea
    • is running on Docker Server as container
    • is running behind reverse Proxy (working can push and pull from outside)
  • Portainer
    • is running on same Docker Server
    • has gitea a insecure-registry

Is it because the IP of Gitea (Docker Host IP) is the same as the Portainer IP (same Host)?

Or am I missing something in the Image Path?

Thank in advance for the support!

Do you have anything in the gitea logs showing the request is reaching it?

Hi, excuse the late answer.

The Logs show:

HTTPRequest [I] router: completed GET /v2/ for 192.168.176.1:60518, 401 Unauthorized in 0.2ms @ container/container.go:131(container.ReqContainerAccess)

I have checked the permissions already and im trying to pull as owner of the organisation.
The weardest thing is that I can pull the Image from outside the lokal Network, going through the proxy.

Here are some more Informations of my setup:

gitea ROOT_URL = http://me.domain.com/repo
Port for gitea container 8088 → 3000

HA Proxy rule:

if url contains v2 → Gitea Backend

Pull command working from my workstation docker going through the Proxy:

docker pull me.domain.com/user/image:1.0

Thanks for the reply.
Got any Idea?

Somehow it only notified me on your second reply here.

Anyhow, perhaps something with CORS?

Basically gitea isn’t going to respond to anything but that domain. I would hazard CORS or something else with “allow local networks”. For CORS you might be able to do something like below in your config but I’m not entirely sure if this is where it’s tripped up or some other config option to change.

[cors]

ENABLED: true

ALLOW_DOMAIN: “your gitea local IP here”

Hi, Thanks for your Ideas. It turned out to be a Problem with the Remote-Proxy. Ive configured the Registry in Portainer via Domain “me.domain.com”. In the Reverse Proxy I hab to add the local IP to the allowed List of the Backend.
Now it works fine, even though Im now leaving the internal Network just to come back.

1 Like