cortex
Search…
Docker
Docker is actually really easy to use. I would highly recommend the use of Docker-Compose over Docker Desktop.

Docker Desktop

For Windows this requires the installation of WSL2.

Docker-Compose

  • Compose files are written in YAML, and define the containers, their parameters, and how they operate
  • To run a compose file, use docker-compose up -d

SQL Server

Volumes & Persisting Data

In theory, you're using this to run a SQL Server instance, so naturally you'll want to persist your data. Doing so is actually pretty easy. You just need to utilize volumes.

Sample SQL Server Compose File

1
version: "3.3"
2
3
services:
4
sqlserver:
5
container_name: sqlserver
6
image: mcr.microsoft.com/mssql/server:2019-latest
7
hostname: sqlserver
8
ports:
9
- "1433:1433"
10
environment:
11
ACCEPT_EULA: "Y"
12
MSSQL_PID: "Developer"
13
SA_PASSWORD: "passwordgoeshere"
14
volumes:
15
- "sql-data:/var/opt/mssql/data"
16
- "sql-data:/var/opt/mssql/log"
17
- "sql-data:/var/opt/mssql/secrets"
18
19
volumes:
20
sql-data:
Copied!
File Breakdown:
Element
Meaning
ACCEPT_EULA
End User Licence Agreement Acceptance Confirmation
MSSQL_PID
Version of SQL Server to Run (see licencing)
SA_PASSWORD
Sysadmin Password
volumes: "sql-data:/var/opt/mssql/data"
Location to map the SQL Data to
volumes: "sql-data:/var/opt/mssql/log"
Location to map the SQL Logs to
volumes: "sql-data:/var/opt/mssql/secrets"
Location to map secrets to
volumes: sql-data:
Create/map the volume for SQL data

Restoring Databases using T-SQL

1
Copied!

Docker Hub

Has a pull limit of 100 per hour unless you have an account!
Last modified 1mo ago