Best approach to providing worker local services

I am currently looking into finding ways to speedup container build times by caching rpm/deb packages using squid and sccache+redis. Both of those work on my local dev machine but I would like to have worker local instances for each.
These services have a certain amount of persistence associated with them so I can not simply re-spawn them on each build.

How can I inject the per worker information via ENV vars into the respective containers?

concourse aims to reduce and/or eliminate dependency on the underlying worker’s configuration, so currently I don’t believe this is possible

one alternative is to propagate the host’s IP into the worker as the DNS address, then you could lookup the host’s ip through a custom local record, and connect to the host service through that

you’ll also need to enable CONCOURSE_GARDEN_ALLOW_HOST_ACCESS (or whatever it’s called)

1 Like

I forgot that there were those network filter options. Thanks for pointing out! Do you by chance know documentation for all available options outside the source code?

But even with that I’d need to inject the env vars via my yaml declaration rather than from the container executor which is what I would like to avoid - or introduce service discovery into the container - sounds like madness to me :]
I was hoping for an easy way to inject environemt vars or a config file into each container.

Did somebody try to replace gdn with something else like railcar/runc/rkt/podman which have more options to pass through?