eb3264ba0f7d5796a37f8539269f6014e12e4957
SQL Server 2025 on Arch Linux (Docker) — localdev-ready
This repo provides a reproducible local SQL Server 2025 setup using Docker Compose, plus convenience scripts for start/stop and database provisioning ("betanken").
Layout / Mini Convention
compose.yml
Docker Compose definition (SQL Server 2025 container)..env.example→ copy to.env(not committed)
Holds yourMSSQL_SA_PASSWORDand optional settings (port, edition).scripts/
Convenience scripts:start.sh— start container and wait until healthystop.sh— stop containerdown.sh— remove container (keeps data on disk)seed.sh— run alldb/seed/*.sqlin ordermigrate.sh— run alldb/migrations/*.sqlin orderreset.sh— delete./data(DESTROYS DB files), then start + seed + migrate
db/seed/(idempotent)
Scripts that can be re-run safely. Typical content:- create database(s) if missing
- create logins/users if missing
- minimal reference data
Naming:
001_*.sql,010_*.sql, ...
db/migrations/(forward-only)
Schema/data changes over time. Each file should be run exactly once per environment. Naming:2026-01-30_001_create_tables.sql,2026-02-05_002_add_index.sql, ...data/(gitignored)
SQL Server data files mounted from the host.backup/(gitignored)
Place.bakfiles here if you want to restore from backups.
Recommended workflow
-
Copy env:
cp .env.example .env # edit .env (set strong password!) -
Start server:
./scripts/start.sh -
Provision baseline:
./scripts/seed.sh ./scripts/migrate.sh -
Work with T-SQL (VS Code):
- Install extension: SQL Server (mssql) (Microsoft)
- Connect:
- Server:
localhost - Port: value from
MSSQL_PORT(default 1433) - Auth: SQL Login
- User:
sa - Password:
MSSQL_SA_PASSWORD
- Server:
- Open any
.sqlfile and run Execute Query.
Gitea-ready notes
.envis ignored (secrets).data/andbackup/are ignored (local artifacts).- Use the issue/PR templates under
.gitea/for consistent collaboration.
Description
Local SQL Server 2025 dev environment under linux using docker. Contains helpful scripts to support local SQL development.
Languages
Shell
89.9%
TSQL
10.1%