Hacker News new | ask | show | jobs
by colechristensen 1221 days ago
How long are we talking? Are the containers getting pulled from somewhere across the internet and it’s a network bottleneck?
2 comments

This is what I’m working on next week. The majority of time is spent building the first n numbers of our Dockerfiles (which aren’t cached in our test/deploy pipeline).

I’ll be baking some images with dependencies included, so the only stuff in the updated Dockerfile will be pulling the pre baked images from our registry and commands to build and run our app code.

We do the pre-baked dependency images too, and it's definitely workable, but I feel like it's a lot of overhead maintaining those— you have to build and distribute and lifecycle them, and it's extra jobs to monitor. Plus you now have an implicit dependency between jobs that adds complication to black-start scenarios. I wish tools like GitLab CI had more automated workflows for being able to automatically manage those intermediate containers, eg:

- Here's a setup stage, the resulting state of which is to be saved as a container image and used as the starting point for any follow-on stages that declare `image: <project/job/whatever>`

- Various circumstances should trigger me to be rebuilt: weekly on Saturday night, whenever repo X has a new tag created, whenever I'm manually run, whenever a special parallel "check" stage takes more than X minutes to complete, etc.

Ultimately, I think the necessity for all this kind of thing really just exposes how weak the layered container image model is— something like Nixery that can delivery ad-hoc environments in a truly composable way is ultimately a much better fit for this type of use-case, but it has its own issues with maturity.

it's a 30-90s 'setup' for a compile that usually lasts about 10-30s.

The setup time is fairly constant even for very quick jobs.

For longer jobs where it takes less of a percentage of the total time it's not a bother, like when we run integration tests for a few minutes.

Oh installing dependencies and things? Have prebaked images that already contain those things.
Yep, I'm talking about the time before my first command runs.