Ask help for App/Docker reigstry mirror doesn't work

Hi, I’m using App to deploy cloudflared on RouterOS 7.21.2 on RB5009UG+S+.

In China, we can’t access docker website directly because GFW. So I configured registry mirror like 1ms.run (which docker mirror can access directly in China). But when I try to deploy, there still using registry-1.docker.io as docker image source.

App Configuration like this:

[admin@MikroTik] > /app/settings/print
                   disk: usb1-part3
       registry-mirrors: docker.1ms.run
              router-ip: 192.168.2.2
     assumed-lan-bridge: none
     assumed-media-path: usb1-part3/media
  assumed-download-path: usb1-part3/media/downloads
         show-in-webfig: yes
            auto-update: yes

[admin@MikroTik] > /app/settings/get registry-mirrors # this is not work as expect
[admin@MikroTik] >

And Docker configuration like this:

[admin@MikroTik] > /container/config/print
    registry-url: https://docker.1ms.run
        username: my-username
       layer-dir: /usb1-part1/docker/layer
          tmpdir: /usb1-part1/docker/tmp
     memory-high: unlimited
  memory-current: 0

[admin@MikroTik] > /container/config/get registry-url # this is not work as expect too
[admin@MikroTik] >

And the error message is

container app-cloudflared download/extract error: fetch config failed: get config (https://registry-1.docker.io/v2/cloudflare/cloudflared/blobs/sha256:d32febedc2bf7cc11de782638bbe7fcc9468ce799849850bae975ee542dce734) failed: timeout connecting

Looks like the registry-mirror and registry-url didn’t worked after apply configuration. How could I fix this, Thanks very much.

It takes map/pair of registry to a mirror registry, seperated by colon. I cannot test it, but I think you might have better luck trying:

/app settings registry-mirrors=docker.io:1ms.run,ghcr.io:1ms.run,lscr.io:1ms.run

That should cover all the registry that the built-in apps use. Now I don't know the chinese mirror for GitHub or LinuxContainers registry, so cannot help there. But you do likely need the mapping between source registry to destination/mirror registry.

The WebFig/WinBox UI show this a bit clearer since the force you provide the pair of value...but it seems it not an error at CLI to leave the : blank... That seem to be a bug, since you should have gotten an error returned from trying to set an invalid mirror mapping. Now perhaps there is/should be come "wildcard" mirror, IDK.

But if you want to use all the /app in the catalog, you'd need to map the three registries shown in above command – since not all /app come from docker.io.

@Amm0 Thank you so much, it works for me now.