更新时间:2023-12-05 13:55:58
如 issue 2569 :
这是预期的。 SSH会作为登录过程的一部分来清除环境。
This is expected. SSH wipes out the environment as part of the login process.
解决方法之一是将环境变量转储到 / etc / environment
(例如 env | grep _>> / etc / environment
),然后再启动Supervisor。
进一步的登录进程应该是源文件,而tada!有你的环境。
One way to work around it is to dump the environment variables in /etc/environment
(e.g. env | grep _ >> /etc/environment
) before starting Supervisor.
Further "login processes" should source this file, and tada! There is your environment.
那个 env | grep _>>> / etc / environment
可以是关联的默认运行脚本的一部分(通过 ENTRYPOINT
或 CMD
)到您的图像。
That env | grep _ >> /etc/environment
could be part of a default run script associated (through ENTRYPOINT
or CMD
) to your image.