Skip to content

Commit b90a5ae

Browse files
Add macOS and Linux specific commands for database setup
Co-authored-by: dlevy-msft-sql <194277063+dlevy-msft-sql@users.noreply.github.com>
1 parent b95713e commit b90a5ae

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

BUILDGUIDE.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,39 @@ sqlcmd config connection-strings
240240
```
241241
Copy the ODBC connection string and remove the driver clause before storing it in your `DB_CONNECTION_STRING` environment variable.
242242

243-
### macOS & Linux
244-
Similar commands are available for macOS and Linux. See the [go-sqlcmd documentation](https://learn.microsoft.com/en-us/sql/tools/sqlcmd/quickstart-sqlcmd-create-container?view=sql-server-ver17) for platform-specific instructions.
243+
### macOS
244+
```bash
245+
# Install Docker Desktop and sqlcmd
246+
brew install --cask docker
247+
brew install sqlcmd
248+
```
249+
Start Docker Desktop, then:
250+
```bash
251+
sqlcmd create mssql --name mssql-python --accept-eula tag 2025-latest --using https://github.com/Microsoft/sql-server-samples/releases/download/wide-world-importers-v1.0/WideWorldImporters-Full.bak
252+
sqlcmd config connection-strings
253+
```
254+
Copy the ODBC connection string and remove the driver clause before storing it in your `DB_CONNECTION_STRING` environment variable.
255+
256+
### Linux
257+
```bash
258+
# Install Docker and sqlcmd (Ubuntu/Debian)
259+
sudo apt-get update
260+
sudo apt-get install docker.io
261+
sudo systemctl start docker
262+
sudo systemctl enable docker
263+
264+
# Install sqlcmd
265+
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo gpg --dearmor -o /usr/share/keyrings/microsoft-prod.gpg
266+
echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/microsoft-prod.gpg] https://packages.microsoft.com/repos/microsoft-ubuntu-$(lsb_release -rs)-prod $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/mssql-release.list
267+
sudo apt-get update
268+
sudo apt-get install sqlcmd
269+
```
270+
Then create the SQL Server container:
271+
```bash
272+
sudo sqlcmd create mssql --name mssql-python --accept-eula tag 2025-latest --using https://github.com/Microsoft/sql-server-samples/releases/download/wide-world-importers-v1.0/WideWorldImporters-Full.bak
273+
sqlcmd config connection-strings
274+
```
275+
Copy the ODBC connection string and remove the driver clause before storing it in your `DB_CONNECTION_STRING` environment variable.
245276

246277
---
247278

0 commit comments

Comments
 (0)