Docker / congifparser error in requirements.txt

In my code I’m using configparser:

from configparser import ConfigParser

And I’m using pip freeze to generate my requirements.txt

  • running container from private registry with docker swarm
  • nginx proxy from port 80 to other ports
  • Maven docker cache dependencies
  • ASP.NET Core 1.0 RC1 Docker with dnu publish
  • Install mysqlclient-python in Docker
  • My docker data-only container is empty
  • pip freeze > requirements.txt

    And for configparser it’s writing


    But that fails when I do a pip install -r requirements.txt from within the docker container via a docker build:

    docker build -t denzel .
    Downloading/unpacking configparser==3.3.0.post2 (from -r /home/denzel/requirements.txt (line 2))
    Could not find a version that satisfies the requirement configparser==3.3.0.post2 (from -r /home/denzel/requirements.txt (line 2)) (from versions: 3.2.0r1, 3.2.0r2, 3.2.0r3, 3.3.0r1, 3.3.0r2, 3.5.0b1, 3.5.0b2)
    Cleaning up...
    No distributions matching the version for configparser==3.3.0.post2 (from -r /home/denzel/requirements.txt (line 2))

    But this works locally via pip install:

     pip install -r requirements.txt
    Requirement already satisfied (use --upgrade to upgrade): aniso8601==1.1.0 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 1))
    Requirement already satisfied (use --upgrade to upgrade): configparser==3.3.0.post2 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 2))

    NOTE: I fixed this by removing the version and just using configparser, no version. Still wanted to post my question to get the reason why it’s failing.

  • What's eth0 used for in docker host machine
  • Not able to connect to the Docker server running on another Linux system
  • Docker - how can I copy a file from an image to a host?
  • after delete docker image, why can still find the deleted image by _catlog api?
  • How would I pass environment into docker using bash?
  • logout/login from inside Vagrantfile
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.