Tag: pyodbc

使用pyodbc将docker python连接到SQL服务器

我试图连接在docker容器中运行的pyodbc python脚本login到一个MSSQL数据库我已经尝试了各种docker文件,但没有能够进行连接(失败时,build设docker或python试图连接),有没有人有一个工作dockerfile,使用pyodbc: Dockerfile: # Use an official Python runtime as a parent image FROM python:2.7-slim # Set the working directory to /app WORKDIR /app # Copy the current directory contents into the container at /app ADD . /app # Install any needed packages specified in requirements.txt RUN pip install -r requirements.txt # Run app.py when […]