https://prefect.io logo
d

Dimitris Stafylarakis

12/03/2020, 1:22 PM
hey all! I have an issue with using Docker storage; I am trying to use a pre-built base image, however I get an error (
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: <http+docker://localhost/v1.40/images/create?tag=latest&fromImage=>...
) and docker.errors.ImageNotFound when I try to register the flow. Others have mentioned similar errors in the past, but as far as I saw this was when trying to deploy the flow, not when building the image. Any clues/hints/tips would be appreciated! I'm on OSX using docker-desktop btw, just the default config. Thanks in advance 🙂
j

Joël Luijmes

12/03/2020, 1:23 PM
Do you have docker running? I notice a similar (not sure if exactly same) 404 error when I haven’t started docker yet
d

Dimitris Stafylarakis

12/03/2020, 1:23 PM
yep, it's running, also building its own image (i.e. if I don't specify a base_image)
j

Joël Luijmes

12/03/2020, 1:30 PM
Ah alright, then I wouldn’t know. Is your pre-built image on a private registry, if so, maybe prefect needs some authentication details
d

Dimitris Stafylarakis

12/03/2020, 1:31 PM
no, it's available locally. according to the docs, no need to push to a remote registry if it's available locally + the agent
Copy code
Note that you don't necessarily need to push your custom base image to a registry; as long as it resides on the machine that you register from, your Docker daemon will be able to use it as your Flow's base image.
j

Joël Luijmes

12/03/2020, 1:33 PM
Hmm then I’m out of ideas, hopefully someone else has a clue 😕
🙏 1
d

Dimitris Stafylarakis

12/03/2020, 1:42 PM
tried the same on a Linux machine, same error
d

Dylan

12/03/2020, 2:41 PM
Hi @Dimitris Stafylarakis, Check out this doc, it has some tips on how to debug Docker Storage https://docs.prefect.io/core/advanced_tutorials/local-debugging.html#locally-check-your-flow-s-docker-storage
d

Dimitris Stafylarakis

12/03/2020, 3:38 PM
hey @Dylan thanks! it already fails when trying to build (see snippet below) so already at the first step. I'm suspecting the docker python client..
Copy code
flow = Flow("docker-flow", tasks=[yet_another_task])
flow.storage = Docker(base_image="prefect-local-test:latest")
built_storage = flow.storage.build(push=False)
d

Dylan

12/03/2020, 3:48 PM
hmmm
z

Zanie

12/03/2020, 3:55 PM
@Joël Luijmes @Dimitris Stafylarakis I like that ya’ll are helping each other 😄 Great to see. I can try to reproduce this locally later today.
🙌 1
d

Dimitris Stafylarakis

12/03/2020, 3:56 PM
that's what communities are for, right?
z

Zanie

12/03/2020, 3:56 PM
That’s the dream haha
Looks like you’re missing the
local_image
kwarg
Copy code
local_image (bool, optional): an optional flag whether or not to use a
            local docker image, if True then a pull will not be attempted
d

Dimitris Stafylarakis

12/03/2020, 3:59 PM
ah cool, seems to work now 👍 thanks
documentation might be a bit misleading here, right?
I'm referring to the part I mention above, it would be good to mention the local_image argument there too!
z

Zanie

12/03/2020, 4:05 PM
We’d love a clarifying PR 🙂 otherwise it’ll get added to the todo stack!
d

Dimitris Stafylarakis

12/03/2020, 4:06 PM
I'm fine submitting one 🙂 just checking that I'm not missing sth obvious being a newbie