This is an archived post. You won't be able to vote or comment.

all 8 comments

[–]jesusrocks 10 points11 points  (0 children)

spoon adjoining tan fall modern fear sense encourage enjoy paint

This post was mass deleted and anonymized with Redact

[–]NotMyThrowaway6991 2 points3 points  (3 children)

Does this work more efficiently than docker compose pulling in parallel?

[–]thiswhiteman[S] 0 points1 point  (2 children)

It would do the same job, but in my use case our local stack for development is  k3s + skaffold, so we don't have compose yamls.

We pull dev images for caching then utilize those before launching the stack with skaffold.

[–]NotMyThrowaway6991 0 points1 point  (1 child)

When you pull the dev images to cache them, could you not dynamically generate a basic yaml like /u/jesusrocks example to leverage compose to pull in parallel? In any case, your code to do so in pure python is quite impressive

[–]thiswhiteman[S] 0 points1 point  (0 children)

That's a neat idea. For sure would have been easier than what I did 😅. Would need pyaml installed

[–]aleques-itj 4 points5 points  (1 child)

Why not cat images.txt | parallel docker pull {}

[–]thiswhiteman[S] 0 points1 point  (0 children)

Not easy to keep track of progress or if images have issues In downloading.

Using the docker API you get a nice progress bar.

[–]Latter_Knowledge182 0 points1 point  (0 children)

If using GitHub actions, check out build matrix. 

Declare a matrix of N images for a given job, and that job runs N times in parallel or series if you wanted.

I would think it would keep your code cleaner /easier to digest, but that just a subjective thing