containerd / nerdctl

contaiNERD CTL - Docker-compatible CLI for containerd, with support for Compose, Rootless, eStargz, OCIcrypt, IPFS, ...
Apache License 2.0
7.86k stars 585 forks source link

hosts.toml file resolution does not seem to account for default port being ommitted #3047

Open apostasie opened 2 months ago

apostasie commented 2 months ago

Description

nerdctl login https://foo:443 vs. nerdctl login https://foo

If the hosts.toml path contains the port, the second one will fail. On the other hand, if it does not, the first one will fail.

Responsibility for walking the host dir is in dockerconfigresolver.go (NewHostOptions > HostDir()). This does not try to be smart wrt what the host contains (port or no port).

We should patch this so:

Steps to reproduce the issue

See description

Describe the results you received and expected

Fail / not fail.

What version of nerdctl are you using?

1.7.6

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Zheaoli commented 2 months ago

Seems we need rework the whole login and auth part = =

apostasie commented 2 months ago

Seems we need rework the whole login and auth part = =

Yes, that is what I am thinking. I am on it. Will start with revamping testing.