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

  • What are conceptual and practical differences between containers (i.e. docker) and encapsulated packages (i.e. flatpack, snap)?
  • How to fit docker in this architecture?
  • Deploy to JBoss from Docker Jenkins Container
  • Running the official consul docker image
  • Deis not creating a build when pushing application
  • How to read data from file while running the docker image
  • 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.

  • Setting up the network for Kubernetes
  • Chronicle map and docker containers?
  • find docker containers created using a docker image
  • kube-ui dashboard 503 error caused by cAdvisor
  • Run a maven webapp in a docker container
  • Passing a list of arguments to docker at build / run time
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.