Passing file from worker container into new Docker container

I was planning to create a video describing how to create custom user interfaces in Windmill, for managing Kubernetes clusters.

I need to pass the
kubeconfig.yml
file, containing the authentication details, from the Windmill worker container, into a new Docker container.

Previously, I've simply installed software (such as
kubectl
) into the worker, but using a container helps make things more reliable and less prone to conflicts.

The worker container doesn't appear to have any mounts to the host, except for the Docker unix socket.

I am struggling to think of any ways to pass
kubeconfig.yml
as an environment variable or file.

Any ideas?

EDIT: I suppose one option would be to modify the
docker-compose.yml
to mount a named volume to the worker containers. I could then use the same named volume in my "child" containers from a Bash script. I would prefer to avoid modifying the default deployment though.
image.png
Was this page helpful?