Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.
laudioPublic archive

About

Docker image with python 3.11 and pyodbc. Includes ODBC drivers for MSSQL, PostgreSQL and MySQL.

Topics

Resources

Stars

48 stars

Watchers

13 watching

Forks

Repository files navigation

Build LICENSE PRs Welcome

⚠️ This image is no longer maintained. Please copy over the Dockerfile and make it yours.

pyodbc

Docker image with python 3.11 and pyodbc. Includes ODBC drivers for MSSQL, PostgreSQL and MySQL.

Usage

Pull the image

$ docker pull laudio/pyodbc

Usage as a base image

Use laudio/pyodbc as a base image for your python script.

FROM laudio/pyodbc:3.0.1

WORKDIR /app

# Add your source files.
COPY ["src", "./src"]
COPY ["setup.py", "./"]

RUN pip install .

CMD ["python", "src/main.py"]

Development (Contributing)

# 1. Clone this repository.
$ git clone git@github.com: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>

Testing

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

Basic Connections

Examples showing a basic use case.

  1. MSSQL Example
  2. PostgreSQL Example
  3. MySQL Example

Data Pipelines

Examples illustrating data pipelines using pyodbc.

  1. Data Transfer Example (PostgreSQL)
  2. Data Transfer Example (MSSQL)
  3. Data Transfer Example (MySQL)

License

Licensed under MIT.

About

Docker image with python 3.11 and pyodbc. Includes ODBC drivers for MSSQL, PostgreSQL and MySQL.

Topics

Resources

Stars

48 stars

Watchers

13 watching

Forks

Releases

Used by

Contributors

Languages