Set up a Linux SQL Server database in less than 10 minutes using Docker. With a containerized version of SQL Server, you can run the database server anywhere you can install docker. For instance, this setup was a breeze on my old Macbook Air 8. Interestingly, the OS for the SQL Server container image is Ubuntu 20.04.6.
Docker compose.yaml file to create a SQL Server 2022 Container with persistent volumes
- Linux OS
- Persistent data storage with volumes
- Changes the SA password
To start the container, run docker-compose up -d from the working directory with the compose.yaml file.
After starting the container, SQL Server will startup. This takes about a minute for my blank database. You can then connect to the SQL Server on port 1433 using the ‘sa’ account and the password set in the compose.yaml file.