Maria
03/30/2022, 6:35 AMflow.run_config = DockerRun(image="my_image", host_config={"binds":["/var/run/docker.sock:/var/run/docker.sock"]})
But I also need to pull an image when its not available and this step fails since I am not authenticated from inside my flow container.
I can probably create a shell task that does docker login for me before image pull, but I am wondering if there are better options?Anna Geller
03/30/2022, 8:32 AMMaria
03/30/2022, 10:56 AMKevin Kho
03/30/2022, 1:52 PMMaria
03/30/2022, 8:33 PMKevin Kho
03/30/2022, 8:35 PMMaria
03/30/2022, 8:36 PMdocker login
in a ShellTask. But then I don't understand how come tasks CreateContainer()
, StartContainer()
, etc work fine and produce expected result but PullImage()
doesn't? They all should talk to an outside Docker API which is bind mounted to the Flow containerKevin Kho
03/30/2022, 11:04 PMMaria
03/30/2022, 11:07 PMdocker.errors.APIError: 500 Server Error for <http+docker://localhost/v1.41/images/create?tag=latest&fromImage=[...url...]>: Internal Server Error ("Head [...url...]/manifests/latest": no basic auth credentials")
Kevin Kho
03/30/2022, 11:17 PMReadNamespacedJob
which creates a container.
Also! you can try breaking this us into flow of flows and using StartFlowRun
and create_flow_run
Maria
03/30/2022, 11:23 PMKevin Kho
03/30/2022, 11:25 PMMaria
03/30/2022, 11:27 PM