Rafal
06/15/2020, 4:46 PMUnexpected error: ImageNotFound(HTTPError('404 Client Error: Not Found for url: <http+docker://localhost/v1.40/containers/create')>)
- this error occurs when I am trying to run my local docker image. I was trying to change docker_server_url but nothing worked. Error Unexpected error: DockerException('Invalid bind address format: /var/run/docker.sock')
. Any ideas?Kyle Moon-Wright
06/15/2020, 5:15 PMRafal
06/15/2020, 5:17 PMKyle Moon-Wright
06/15/2020, 5:33 PMRafal
06/15/2020, 5:41 PMKyle Moon-Wright
06/15/2020, 7:49 PMfrom prefect import Flow
from prefect.tasks.docker.containers import CreateContainer, StartContainer, GetContainerLogs
container = CreateContainer(
image_name="<registry>/<imagename>:<tagname>"
)
start = StartContainer()
container_logs = GetContainerLogs()
with Flow("flow") as flow:
start_container = start(container_id=container)
code = container_logs(container_id=container, upstream_tasks=[start_container])
flow.run()
Rafal
06/16/2020, 5:38 PM