Skip to content

Commit

Permalink
pass registry auth
Browse files Browse the repository at this point in the history
  • Loading branch information
tonybart1337 committed Oct 30, 2024
1 parent ed4f876 commit cc922de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions agent/worker/task_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,13 @@ def check_and_pull_sly_net_if_needed(
if sly_net_client_image_name is None:
sly_net_client_image_name = cur_container.attrs["Config"]["Image"]

docker_hub_image_info = ic.get_registry_data(sly_net_client_image_name)
registry = docker_utils.resolve_registry(sly_net_client_image_name)
auth = docker_utils._registry_auth_from_env(registry)

docker_registry_image_info = ic.get_registry_data(sly_net_client_image_name, auth_config=auth)
name_with_digest: str = cur_container.image.attrs.get("RepoDigests", [""])[0]

if name_with_digest.endswith(docker_hub_image_info.id):
if name_with_digest.endswith(docker_registry_image_info.id):
logger.info("sly-net-client is already updated")
return False
else:
Expand Down

0 comments on commit cc922de

Please sign in to comment.