Closed aznashwan closed 2 weeks ago
IMO the set of possible fixes, from "most to least correct" would be:
making the entrypoint.sh from the upstream Dockerfile transparently pass all args it gets to /usr/bin/registry_DO_NOT_USE_GC, with it defaulting to serve /etc/registry/config.yml if none are given
I have taken the liberty to propose what I though was the best fix here: https://github.com/goharbor/harbor/pull/20778
The
registry-dpl
's template currently only happens to coincidentally work with the upstreamgoharbor/registry-photon
image because:entrypoint.sh
script as theENTRYPOINT
entrypoint.sh
ignores all arguments and always exec's/usr/bin/registry_DO_NOT_USE_GC serve /etc/registry/config.yml
registry-dpl
template only setsargs: ["serve", "/etc/registry/config.yml"]
, which only coincidentally matches the exec call inentrypoint.sh
and could cause issues if the upstream image'sentrypoint.sh
gets changed.NOTE: The upstream image's
entrypoint.sh
also runsinstall_cert.sh
, which will basically gets "lost" in the Helm chart setup if we directly setcommand: /usr/bin/registry_DO_NOT_USE_GC
in this chart.Possible fixes:
IMO the set of possible fixes, from "most to least correct" would be:
entrypoint.sh
from the upstream Dockerfile transparently pass all args it gets to/usr/bin/registry_DO_NOT_USE_GC
, with it defaulting toserve /etc/registry/config.yml
if none are given/home/harbor/entrypoint.sh
as the entrypoint in this Helm chartinstall_cert.sh
from the Helm chart too (though that risks de-syncing with the upstream Dockerfile)