Python Development Environment for SQL Server
6.1K
This image provides an integrated development environment for Python with connectivity to a remote SQL Server database. Learn more about SQL Server on Linux. To report issues or provide feedback, please file an issue in the SQL Server in Docker GitHub Repository.
The following components are included:
To run an interactive bash session in this container simply run:
docker run -it lbosqmsft/mssql-python-pyodbc
The following optional environment variables can be provided to create the code sample:
$DB_HOST: The IP address or hostname where the SQL Server instance is running.
$DB_USERNAME: The database user in the SQL Server instance.
$DB_PASSWORD: The database user's password in the SQL Server instance.
Note: If you are running SQL Server in a Docker container as well, you can obtain the container's IP address using docker inspect <containerID>.
After passing the above environment variables Within the container, you can run the following commands:
python connect.py: Execute the code sample to connect to SQL Server. The connect.py file will already have the database parameters.sqlcmd -S $DB_HOST -U $DB_USERNAME -P $DB_PASSWORD: This will run the command-line client for SQL Server where you can execute T-SQL statements against it.Content type
Image
Digest
Size
275.4 MB
Last updated
over 9 years ago
docker pull lbosqmsft/mssql-python-pyodbc