Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

[RFC] shippable-image: Export environment variables from "docker -e VARIABLE..." to ssh #225

Open
moylop260 opened this issue Apr 19, 2017 · 2 comments

Comments

@moylop260
Copy link
Contributor

Currently we have ssh access for runbot builds but the environment variables is not detected

Using:

docker run --name=myctn -p 8022:22 -e VARIABLE=1 IMAGE bash
docker exec -it myctn bash
echo $VARIABLE
1  #  <<--- good

ssh -p 8022 odoo@localhost
echo $VARIABLE
  # <<-- nothing???

Many variables are used from MQT scripts could be a good feature have this environment variables.

NOTE: Except environment variables secrets like as TOKEN

@moylop260
Copy link
Contributor Author

@ruiztulio Do you have any idea about?

@ruiztulio
Copy link
Contributor

@moylop260 That's because ssh creates a non-interactive shell thus i won't load those vars, in bash is possible to override this adding the variables (if you want them to available for all users) in /etc/profile so they'll be available for all users in both modes (non and interactive) or in the user's ~/.bashrc

As they are not secrets, I guess that there is no problem adding those files

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants