Below is my docker file
FROM ubuntu:latest
COPY requirements.txt .
RUN apt-get update -y && apt-get install -y telnet unixodbc-dev ksh curl apt-utils apt-transport-https debconf-utils gcc build-essential python2.7.x python-dev build-essential && curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py && python get-pip.py && curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && curl https://packages.microsoft.com/config/ubuntu/18.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && curl https://packages.microsoft.com/config/ubuntu/21.04/prod.list > /etc/apt/sources.list.d/mssql-release.list && apt-get update && ACCEPT_EULA=Y apt-get install -y msodbcsql17 && ACCEPT_EULA=Y apt-get install -y mssql-tools && /bin/bash -c 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc && /bin/bash -c "source ~/.bashrc" && pip install -r requirements.txt && apt-get -y clean && rm -rf /var/lib/apt/lists/*
Entrypoint ["python"]
Below is my requirements.txt
pyodbc==4.0.30
I am getting the below error:
CodePudding user response:
Cause: found extra "." caused the issue.
Solution: docker run -t getting-started