Yacht icon indicating copy to clipboard operation
Yacht copied to clipboard

[Feature Request] Title

Open nikosgpet opened this issue 3 years ago • 2 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Currently, environment variables passed to Yacht on its creation are not passed to the containers managed by Yacht. This is unfortunate because I would like to pass some environment variables from the host to Yacht and then forward them to the containers. Most notably, I want to pass the ssh-agent from the host machine to the running containers through the $SSH_AUTH_SOCK variable set by the host.

Ssh-agent is necessary to be able to easily update my gits from inside the containers themselves.

Describe the solution you'd like A clear and concise description of what you want to happen.

As I understand it by reading the code, this is because all environment variables are cleaned and they are not passed to the docker-compose on creation time. From my understanding, this could be relatively easily changed to pass through all available variables downwards by default instead of cleaning the environment.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Otherwise, I will need to manually pass the content of the variable in each container, and monitor if the contents of the variable changed to then manually update them in each docker-compose.

Additional context Add any other context or screenshots about the feature request here.

nikosgpet avatar Jun 22 '21 01:06 nikosgpet

The reason why I'm cleaning it is that variables used in Yacht can interfere with variables set within docker-compose projects. A more ideal solution would be to have kind of global variable page within projects to allow them to be passed like how you want.

Would that solution work for you or is there an alternative you would suggest?

SelfhostedPro avatar Jun 22 '21 02:06 SelfhostedPro

Sure, that could work. Would be great if it could handle the edge scenario of declaring a variable in the form SSH_AUTH_SOCK=$SSH_AUTH_SOCK where SSH_AUTH_SOCK is a variable we passed on to Yacht. This would allow passing to Yacht variables set by the system.

nikosgpet avatar Jun 22 '21 02:06 nikosgpet