I am trying to build a docker image with
- Python
- PIP
- pymssql
below is my Dockerfile
FROM ubuntu:latest
RUN apt-get update -y
RUN apt-get update && apt-get install -y telnet && apt-get install -y ksh && apt-get install -y python2.7.x && apt-get update && apt-get install -y python-pip python-dev build-essential && apt-get -y clean && rm -rf /var/lib/apt/lists/*
RUN pip install pymssql==2.1.3
ENTRYPOINT ['python']
it is throwing the following error:
CodePudding user response:
Python-pip is only available on Ubuntu Bionic. see python-pip.
You need to switch from focal to bionic. Universe repository should be enabled.
CodePudding user response:
If you don't mind to use python3 (otherwise use virtual env) I rate you to do :
RUN apt-get install python3-pip
Then you will be able to install whatever pip package you need : by doing :
RUN pip3 install <your_pip_pkg>