I currently have the following Dockerfile
to create my Docker image.
FROM python:3.6.6-alpine3.8
# Add dependencies for Python packages pandas, numpy and pyodbc
RUN apk add --no-cache curl gcc g++ unixodbc-dev
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
# Project files
ARG PROJECT_DIR=/srv/scripts
RUN mkdir -p $PROJECT_DIR
WORKDIR $PROJECT_DIR
COPY requirements.txt ./
# Install Python dependencies
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
I would like to include various ODBC drivers in this image so that I can use them to connect to different databases from the Python program running in my container.
- The Python program is using
Pyodbc
to connect to databases. - The ODBC drivers I need to install are:
- PostgreSQL
- MySQL
- Ms SQL Server
- Teradata
- Oracle
- Hive
- Impala
I wanted to start with PostgreSQL thinking it would be the easiest one but I could not find any package on the Alpine Linux Package manager. Do you have any idea how I should install such a driver?