I am have some problem while install pip package in docker image.
My Dockerfile is like this
....
RUN python -m venv /vir_env
RUN . /vir_env/bin/activate && pip install --upgrade pip
RUN pip install -r ./requirements.txt
....
My requirements.txt file is generate by pip freeze > requirements.txt
But when I run docker build it always error in package have "ubuntu" in there name python-apt==2.0.0+ubuntu0.20.4.6
, distro-info===0.23ubuntu1
Error log:
....
#13 5.890 ERROR: No matching distribution found for python-apt==2.0.0+ubuntu0.20.4.6
#13 6.360 WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
#13 6.360 You should consider upgrading via the '/vir_env/bin/python3 -m pip install --upgrade pip' command.
------
error: failed to solve: executor failed running [/bin/sh -c . /vir_env/bin/activate && pip3 install -r /requirements.txt]: exit code: 1
....
#13 5.890 ERROR: No matching distribution found for distro-info===0.23ubuntu1
#13 6.360 WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
#13 6.360 You should consider upgrading via the '/vir_env/bin/python3 -m pip install --upgrade pip' command.
------
error: failed to solve: executor failed running [/bin/sh -c . /vir_env/bin/activate && pip3 install -r /requirements.txt]: exit code: 1
I already try pip upgrade but not don't work.
Is there any other way to fix or is there any update about this but I missed ?