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
Anna Geller
Maria
03/30/2022, 10:56 AMMaria
03/30/2022, 10:59 AMKevin Kho
Maria
03/30/2022, 8:33 PMKevin Kho
Maria
03/30/2022, 8:36 PMMaria
03/30/2022, 10:59 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 containerMaria
03/30/2022, 11:02 PMKevin Kho
Maria
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
ReadNamespacedJob which creates a container.
Also! you can try breaking this us into flow of flows and using StartFlowRun and create_flow_runMaria
03/30/2022, 11:23 PMKevin Kho
Maria
03/30/2022, 11:27 PM