Open MichaelPereira opened 6 years ago
With the support of clair V3, the behavior has been moved into a V1-specific function newAPIV1
but the behavior stays the same when using V1.
@MichaelPereira thanks for the report, do you remember which port is used by default for https in Clair? AFAIR it's also 6060, but not sure, need to check Calir docs. If so option 1 sounds like a right thing to do. If it's different (like 443) we should use it as a sane default for https.
It looks like clair does only expose 6060 by default from what I can see in the Dockerfile, config sample or default config, so using it with 443 for HTTPS is something that people have to explicitly set at other levels like a proxy or load balancer in front of the clair service.
I assume that not that many people would have went through those pains (and integrated it with klar) so far to rule out changing the current behavior for V1 then.
Hi,
First of all, thanks for the development of this CLI tool, it makes clair much easier to integrated inside a CI/CD workflow :)
The current documentation for
CLAIR_ADDR
in the usage section of the README indicates that the port6060
is used by default if it is not set.This is not the current behavior of the code (despite similar comments), as port
6060
will be set by default only forhttp
scheme, as this condition is false forhttps
due to the fact that the:
character will be on 5th position due to the extra character.Do you prefer to
<
into<=
)? This would break the current behavior and force people to specify port443
in their configuration if they update their version of klar. I can make the PR if that's the chosen solution.or
http
andhttps
(why would one set a default port and not the other?)Regards, Michael