title: Python script can't access some environment variables
body: <p>I am building Docker Image <code>FROM node:8.9.3-alpine</code> (which is Debian) and then running it as usual and passing parameters like this:</p>
  
  <pre><code>docker run -dt \
  -e lsRegion=${bamboo_lsRegion} \
  -e lsCluster=${bamboo_lsCluster} \
  </code></pre>
  
  <p>Then inside that container I am exporting some variables and when I echo them, I can see proper value</p>
  
  <pre><code>export lsEnv=${lsEnv:-'dev'}
  </code></pre>
  
  <p>Later in scripts I run python script and when I run the <code>print(os.environ)</code> I can see all the variables from <code>docker run</code> like <code>lsRegion</code> but I do not see the newly exported one like <code>lsEnv</code>.</p>
  
  <p>I already found and tried to solve with this: <a href="https://stackoverflow.com/questions/30981780/python-cant-access-newly-defined-environment-variables">Python: can&#39;t access newly defined environment variables</a> by calling the <code>source ~/.bashrc</code> but I cannot find that file.</p>
  
  <p>I have tried</p>
  
  <pre><code>~/.bashrc
  /etc/bash.bashrc
  /root/.bashrc
  </code></pre>
  
  <p>But neither of those exist (also does not know if this solve my problem) and it ends with this error message <code>/app/deploy.sh: source: line 16: can't open '/root/.bashrc'</code></p>
  
  <hr>
  
  <p>More reproducible example:</p>
  
  <p>Dockerfile</p>
  
  <pre><code>FROM node:8.9.3-alpine
  
  RUN apk add --no-cache \
      python \
      py-pip \
      ca-certificates \
      openssl \
      groff \
      less \
      bash \
      curl \
      jq \
      git \
      zip \
      build-base \
    &amp;&amp; pip install --no-cache-dir --upgrade pip awscli \
    &amp;&amp; aws configure set preview.cloudfront true
  
  ENV TERRAFORM_VERSION 0.11.10
  
  RUN wget -O terraform.zip https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip &amp;&amp; \
      unzip terraform.zip -d /usr/local/bin &amp;&amp; \
      rm -f terraform.zip
  
  RUN apk -v --update add python py-pip
  RUN pip install --upgrade awscli
  RUN pip install --upgrade boto3
  
  COPY ./build.variables /app/build.variables
  COPY ./aws/taskdef/template.json /app/template.json
  COPY ./deploy.sh /app/deploy.sh
  COPY ./deploy.py /app/deploy.py
  COPY ./terraform /app/terraform
  
  CMD ["sh", "/app/deploy.sh"] 
  </code></pre>
  
  <p>deploy.sh</p>
  
  <pre><code>#!/bin/bash -x
  
  cd /app/terraform
  ./run-terraform.sh
  cd ..
  python /app/deploy.py
  </code></pre>
  
  <p>terraform/run-terraform.sh</p>
  
  <pre><code>   ...
     export lsEnv="NotThere"
     ...
  </code></pre>
  
  <p>python script</p>
  
  <pre><code>#!/usr/bin/env python
  import os
  print(os.environ)
  </code></pre>
  
  <p>The print will show <code>lsRegion</code> or <code>lsCluster</code> but it will not show the <code>lsEnv</code></p>