Docker buildimage intermittently builds image
See original GitHub issueHello, I am playing around with prefect and trying to use the buildimage for docker
from prefect import task, Flow
from prefect.tasks.docker import images
@task
def build_image():
images.BuildImage(path='.').run()
with Flow("ETL") as flow:
e = build_image()
flow.run()
[2019-07-16 19:36:37,341] INFO - prefect.FlowRunner | Beginning Flow run for 'ETL'
[2019-07-16 19:36:37,341] INFO - prefect.FlowRunner | Starting flow run.
[2019-07-16 19:36:37,342] INFO - prefect.TaskRunner | Task 'build_image': Starting task run...
[2019-07-16 19:36:41,274] INFO - prefect.TaskRunner | Task 'build_image': finished task run for task with final state: 'Success'
[2019-07-16 19:36:41,275] INFO - prefect.FlowRunner | Flow run SUCCESS: all reference tasks succeeded
I noticed that this intermittently builds an image once about ever 4-5 times I run it. Anyone have an idea what is going on?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Create a base image - Docker Documentation
You can use Docker's reserved, minimal image, scratch , as a starting point for building containers. Using the scratch “image” signals to the...
Read more >React Docker Image Build Takes too long time. I need to fix this
I have run through the azure DevOps pipeline build. Logs it shows for React Image Build is mentioned as below. There are warnings...
Read more >Use Docker to build Docker images - GitLab Docs
Docker -in-Docker with TLS disabled in the Docker executor. Sometimes you might have legitimate reasons to disable TLS. For example, you have no ......
Read more >Building multi-architecture Docker images for Intel and ARM
The image runs very slowly and sometimes hangs or crashes. Clearly, QEMU-based emulation does not work well. Let's now look at how to...
Read more >How to understand building images with docker-compose
Building docker images allow you to leverage other's images and repurpose them for ... You can sometimes skip the extra step of docker-compose...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Sounds good to me! Thanks for prompt feedback!
Great!
So I have a guess here -> it’s possible that
client.build
is an asynchronous / deferred call of some kind, and whenever the Prefect Task exits it prevents the build from actually occurring. What we should do is update the Prefect Task to actually iterate over theclient.build
generator to ensure it completes before returning from the Task.In the meantime, I recommend you implement a custom Task like so:
And I’d bet this works. Looks like I need to audit our Docker Tasks for this behavior!