Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why set VISIBLE=NOW in /etc/profile?

Tags:

bash

docker

ssh

I'm reading a Dockerfile - Dockerizing an SSH Service and it contains the following code:

 ENV NOTVISIBLE "in users profile"
 RUN echo "export VISIBLE=now" >> /etc/profile

Just curious what the purpose of that is?

TIA, Ole

P.S Great article here on ways to avoid running an SSH Server in a Docker container: https://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/

like image 904
Ole Avatar asked Mar 29 '16 18:03

Ole


1 Answers

It's an example of how to pass environment variables when running a Dockerized SSHD service. SSHD scrubs the environment, therefore ENV variables contained in Dockerfile must be pushed to /etc/profile in order for them to be available.

like image 105
Ole Avatar answered Nov 17 '22 11:11

Ole