docker-odoo-image
docker-odoo-image copied to clipboard
[RFC] shippable-image: Export environment variables from "docker -e VARIABLE..." to ssh
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
@ruiztulio Do you have any idea about?
@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