Docker error The command non-zero code: 1 python

i have problem when i tried to build container. And the error is :

The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1

i don’t know why, i follow the code from documentation but always get error.

  • AWS Docker Golang. 'eb deploy' error
  • How do I scale up my cluster on Google Container Engine / Kubernetes?
  • How to list all the commands that executed on a pulled Docker image?
  • java.net.SocketException when accessing docker host
  • Docker on Windows Server 2016 & microsoft-build-tools
  • How to get Container Id of Docker in Jenkins
  • Dockerfile

    FROM python:2.7-slim
    #
    # # Set the working directory to /app
    WORKDIR /app
    #
    # # Copy the current directory contents into the container at /app
    ADD . /app
    #
    # # Install any needed packages specified in requirements.txt
    RUN pip install -r requirements.txt
    #
    # # Make port 80 available to the world outside this container
    EXPOSE 80
    #
    # # Define environment variable
    ENV NAME World
    #
    # # Run app.py when the container launches
    CMD ["python", "app.py"]
    

  • no json module when running python script in docker container
  • Keep getting Could not read CA certificate when trying to start docker
  • docker deploy vs docker stack deploy
  • What are the differences between Kubernetes Pods and Docker Compose(s) (Composures?)
  • Localhost connect MySQL Docker confusion
  • Accessing apache2 residing inside Docker container from Host machine web browser
  • One Solution collect form web for “Docker error The command non-zero code: 1 python”

    Seems issue with the location of the file try to give absolute path of the file that you are referring in dockerfile

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.