[Question] documentation on how to login, re-tag a multi-arch image
tcurdt opened this issue · comments
Question
What I would like to do:
- login to ghcr.io
- re-tag a multi-arch image
There is no docker installed on the system and I am at a loss on how to use regctl registry login
correctly.
It seems to insist to use docker.io
regctl registry config
{
"docker.io": {
"tls": "enabled",
"hostname": "registry-1.docker.io",
"user": "<user>",
"credHost": "https://index.docker.io/v1/",
"reqPerSec": 10,
"reqConcurrent": 3
}
}
Version
$ regctl version
VCSTag: (devel)
VCSRef: unknown
VCSCommit: unknown
VCSState: unknown
VCSDate: unknown
Platform: linux/arm64
GoVer: go1.21.5
GoCompiler: gc
$ ls -la /nix/store/ | grep regctl
dr-xr-xr-x 3 root root 4096 Jan 1 1970 hq3dm22ks45g1sf2aplzma05h3c7cm4n-regclient-0.5.6-regctl
Environment
This is on nixOS on arm
Anything else
The login would be:
regctl registry login ghcr.io
It looks like you have a bad login to Docker Hub in there, which would happen if you didn't provide a registry to login to. That can be cleaned up with:
regctl registry logout
And to retag an image, that would be:
regctl image copy ghcr.io/some/image:tag-a ghcr.io/some/image:tag-b
The regctl
CLI includes help for any command using --help
, e.g.
$ regctl registry login --help
Provide login credentials for a registry. This may not be necessary if you
have already logged in with docker.
Usage:
regctl registry login <registry> [flags]
Flags:
-h, --help help for login
-p, --pass string Password
--pass-stdin Read password from stdin
-u, --user string Username
Global Flags:
--host stringArray Registry hosts to add (reg=registry,user=username,pass=password,tls=enabled)
--logopt stringArray Log options
--user-agent string Override user agent
-v, --verbosity string Log level (debug, info, warn, error, fatal, panic) (default "warning")
A lot of these can probably use more details and examples. I've got that on my TODO list, and we can leave this open until that's done if you'd like.
I think I might have tried just regctl registry login
and totally missed the registry parameter.
That's how the docker.io
got in there. I assume that's the default.
And when reading the help I couldn't really make sense of the --host
which through me off.
Since I needed this for a github action I just used docker
to login and regctl
picked it up just fine.
The regctl image copy
isn't quite the command I expected for retagging - but at least it works.
Not like docker/buildx 😠
Thanks for the help - and the tool!
Re-reading the help I should have managed to figure out the login by myself.
But the host
flags could really benefit from some more details.
Feel free to close.