You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though .bashrc and .bash_profile aren't loaded, any environment variables that were already set by them using export will still persist, so it's not really doing much to prevent "clashing with our paths". Specifically, the PATH value is persisted.
In my case, when running locally, this keeps all my variables, but removes useful things like alias ll="ls -la" and bind 'set completion-map-case on'. Most importantly, I have a custom PROMPT_COMMAND set to a local function, and while the PROMPT_COMMAND variable persists, the local function it refers to doesn't, so I get annoying errors after any command I run.
The proper way of running in a clean environment is env -i. This discards everything previously set by export. However, it comes with caveats of its own. It can't be used in bash.sh, because it will discard all the variables set by the previous links in the script chain, so it needs to be run at the very start of the entrypoint. But even that will end up discarding environment variables set by Docker Cloud, most importantly TRANSCRYPT_PASSWORD.
So in conclusion, I'd like for this line to be removed, and am seeking arguments to the contrary here.
The text was updated successfully, but these errors were encountered:
@Aramgutang I don't remember the conflict that prompted that change, but I'd love it if we could enter a subshell of the same type and config as go.sh is launched with.
The call to
bash --norc --noprofile
here is a bit of half-measure that gives us worst of both worlds:ixc-django-docker/ixc_django_docker/bin/bash.sh
Line 57 in b1af518
Even though
.bashrc
and.bash_profile
aren't loaded, any environment variables that were already set by them usingexport
will still persist, so it's not really doing much to prevent "clashing with our paths". Specifically, thePATH
value is persisted.In my case, when running locally, this keeps all my variables, but removes useful things like
alias ll="ls -la"
andbind 'set completion-map-case on'
. Most importantly, I have a customPROMPT_COMMAND
set to a local function, and while thePROMPT_COMMAND
variable persists, the local function it refers to doesn't, so I get annoying errors after any command I run.The proper way of running in a clean environment is
env -i
. This discards everything previously set byexport
. However, it comes with caveats of its own. It can't be used inbash.sh
, because it will discard all the variables set by the previous links in the script chain, so it needs to be run at the very start of the entrypoint. But even that will end up discarding environment variables set by Docker Cloud, most importantlyTRANSCRYPT_PASSWORD
.So in conclusion, I'd like for this line to be removed, and am seeking arguments to the contrary here.
The text was updated successfully, but these errors were encountered: