Docker image with python 3.11 and pyodbc. Includes ODBC drivers for MSSQL, PostgreSQL and MySQL.
Docker image with python 3.11 and pyodbc. Includes ODBC drivers for MSSQL, PostgreSQL and MySQL.
$ docker pull laudio/pyodbc
Use laudio/pyodbc
as a base image for your python script.
FROM laudio/pyodbc:3.0.0
WORKDIR /app
# Add your source files.
COPY ["src", "./src"]
COPY ["setup.py", "./"]
RUN pip install .
CMD ["python", "src/main.py"]
# 1. Clone this repository.
$ git clone [email protected]:laudio/pyodbc.git
# 2. Go to the image directory.
$ cd pyodbc/images/pyodbc
# 3. Build docker image.
$ make build
# 4. Run the container
$ docker run laudio/pyodbc:<tag>
You can build the test container image providing the flag --target=test
and run it.
# Create .env.test file with your database connection creds
# using the the example file .env.example.
# You'll need to update .env.test with your values after this.
$ cp .env.example .env.test
# Build the test container image and run tests.
$ make clean build test
Examples showing a basic use case.
Examples illustrating data pipelines using pyodbc.
Licensed under MIT.