https://prefect.io logo
a

Adam Roderick

12/31/2020, 6:53 PM
The Dockerfile method of building docker storage is leaving tmp directories like
tmp3v36vta4
after registration with cloud. This is cluttering up our repository. Is there a setting to avoid this?
Or to get that folder name so that I can script a cleanup afterwards?
z

Zanie

12/31/2020, 6:58 PM
Weird, it’s in a context block like
Copy code
with tempfile.TemporaryDirectory(
            dir="." if self.dockerfile else None
        ) as tempdir:
so they should be auto-removed
The
if
statement there is just using the current directory as the base for the temporary directory if you’re using a custom dockerfile.
The
TemporaryDirectory
context should be quite robust ensuring deletion on failures
Does the directory remain every time you build storage?
a

Adam Roderick

01/02/2021, 1:46 PM
Could be a relic of running
docker build()
outside of prefect. I'll report back if that is not the case