Enable configs.file's on remote docker hosts
What I did Copy configs.file's instead of bind-mounting them to make it possible to use file configs when working with remote docker hosts (like setting DOCKER_HOST to a ssh address or setting docker context)
Related issue
implements: #11867
(not mandatory) A picture of a cute animal, if possible in relation to what you did
@ndeloof left you a few questions in the review
any ETA?
@alexey-sh
any ETA?
See discussion in #11867 - it might take some time to decide how to proceed.
Yesterday I made a PR which I then realized it was a duplicate of this one.
I think this PR could benefit from the changes I made in the file pkg/compose/create.go.
It basically keeps some preexisting checks and adds a preflight check to ensure the file used as the source for config/secret can be accessed so that if it's not the case it will fail before creating the container.
Please also see the following comment I made here:
secret.file could also be a folder, not just a file
I'm not sure about that. To keep the behaviour consistent with docker swarm/stack configs&secrets, I think only a file should be allowed. This will also allow for a smooth transition if/when docker config&secrets will be available even when swarm mode is disabled.
Replaced with #12251 that has been updated with rebase on v2.30.0 to get fix for #12186