title: docker-compose --build cannot find python executable but docker run does
body: <p>I've created several docker images to each serve a simple flask app, I've tested that these run as expected when using the <code>docker run</code> command. Now I am trying to connect these services using docker-compose and when I run <code>docker-compose up --build</code> I get the following error: 
  <code>Cannot start service lungs: OCI runtime create failed: container_linux.go:346: starting container process caused "exec: "python\": executable file not found in $PATH": unknown</code>.</p>
  
  <p>If I run the same container in interactive mode and check the PATH, I can see it pointing to the correct python executable. My dockerfile contains: </p>
  
  <pre><code>FROM base_private_image # sets up a user and miniconda on ubuntu
  USER root
  ADD ./ ./ . # copy flask code into image
  RUN pip install flask requests
  USER user # setup in the base_private_image, we need our containers not to run as root
  CMD ["python", "app.py"] # I've tried many variations of this CMD, all with the same result
  </code></pre>
  
  <p>example of docker-compose.yml contents</p>
  
  <pre><code>version: '3'
  services:
    central_service:
        build: ./central_service
        restart: always
        environment:
           - PATH=/home/user/miniconda3/bin/:$PATH
        ports:
          - '5010:5010'
        expose:
          - 5010
  
  </code></pre>
  
  <p>can anyone point out what functional difference between docker-compose and docker run might be causing this? I can't find any issue with the miniconda or python install or the PATH, so I'm thinking it must be something under the hood in docker-compose?</p>
  
  <p>editing to add:
  dockerfile that works, docker-compose can find python:</p>
  
  <pre><code>FROM python:3.7.6-slim
  
  RUN mkdir /trigger_app
  WORKDIR /trigger_app
  
  COPY requirements.txt ./
  RUN pip install -r requirements.txt
  
  ADD . ./
  
  EXPOSE 6000
  
  CMD flask run --host=0.0.0.0 --port=6000
  </code></pre>