为什么在/ etc/profile中设置VISIBLE = NOW?

Ole*_*Ole 17 ssh bash docker

我正在阅读Dockerfile - Docker化SSH服务,它包含以下代码:

 ENV NOTVISIBLE "in users profile"
 RUN echo "export VISIBLE=now" >> /etc/profile
Run Code Online (Sandbox Code Playgroud)

只是好奇它的目的是什么?

TIA,Ole

PS有关避免在Docker容器中运行SSH服务器的方法的文章很棒:https://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/

Ole*_*Ole 17

这是运行Dockerized SSHD服务时如何传递环境变量的示例.SSHD会擦除环境,因此必须将其中ENV包含的变量Dockerfile推送到该环境/etc/profile才能使它们可用.