Skip to content

Commit 8e18c22

Browse files
committed
ensure registry login is done
1 parent fbbc8b7 commit 8e18c22

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

services/autoscaling/src/simcore_service_autoscaling/utils/cluster_scaling.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,20 +64,17 @@ async def ec2_startup_script(
6464
)
6565
)
6666
assert app_settings.AUTOSCALING_EC2_INSTANCES # nosec
67-
if app_settings.AUTOSCALING_REGISTRY: # noqa: SIM102
67+
if app_settings.AUTOSCALING_REGISTRY:
68+
startup_commands.append(
69+
utils_docker.get_docker_login_on_start_bash_command(
70+
app_settings.AUTOSCALING_REGISTRY
71+
)
72+
)
73+
6874
if pull_image_cmd := utils_docker.get_docker_pull_images_on_start_bash_command(
6975
app_settings.AUTOSCALING_EC2_INSTANCES.EC2_INSTANCES_COLD_START_DOCKER_IMAGES_PRE_PULLING
7076
):
71-
startup_commands.append(
72-
" && ".join(
73-
[
74-
utils_docker.get_docker_login_on_start_bash_command(
75-
app_settings.AUTOSCALING_REGISTRY
76-
),
77-
pull_image_cmd,
78-
]
79-
)
80-
)
77+
startup_commands.append(pull_image_cmd)
8178

8279
return " && ".join(startup_commands)
8380

0 commit comments

Comments
 (0)