mirror of
https://github.com/floci-io/floci.git
synced 2026-11-22 21:50:46 -05:00
ECR built repositoryUri, the GetAuthorizationToken proxyEndpoint and the Lambda and ECS image rewrites from floci.port, the port Floci listens on inside its own container. The Docker daemon performs login, push and pull, and reaches Floci through the host port that container publishes. When Floci ran as docker run -p 54321:4566, every advertised address named port 4566 on the host, where nothing answers, so docker login, CDK container asset publishing and ECS or Lambda image pulls failed. EcrRegistryManager now has advertisedPort(): the host port Floci's container publishes for floci.port, read through the existing CurrentContainerNetworkResolver.resolvePublishedPort as RDS does for its proxy endpoint, or floci.port when Floci is not in a container or the port is not published. repositoryUri (hostname and path style, plain and TLS URI mode), proxyEndpoint and rewriteImageUri all use it. The EKS registry mirror keys must match the URIs pods name, so they use the same advertised port. The mirror endpoint stays Floci's in-network address on floci.port. The resolver now caches every published-port answer, "not published" and a failed inspect included, as it already caches the network: a running container's port bindings cannot change, and an inspect that fails fails the same way next time. ECR requests therefore do not inspect the container each time.