latest
(Dockerfile) - the latest release2019-CU8
(Dockerfile) - release based on 2019-CU8-ubuntu-16.04 image2019-CU4
(Dockerfile) - release based on 2019-CU4-ubuntu-16.04 image2019-CU3
(Dockerfile) - release based on 2019-CU3-ubuntu-16.04 image2017-CU9
(Dockerfile) - release based on 2017-CU9 image
A SQL Server for Linux image derived from Microsoft's SQL Server Linux image, but also the following:
- Creation of a login and database on startup from environment variables
- Restoring of bacpac databases from directory
- Running of SQL scripts from directory
These are useful in devops testing scenarios.
docker run -d -e 'SQL_USER=docker' -e 'SQL_PASSWORD=docker' -e 'SQL_DB=docker' -p 1433:1433 -v mssql-data:/var/opt/mssql topaztechnology/mssql-server-linux:latest
This phase is run first after server startup.
- SA_PASSWORD : if specified, overrides the default sa password. A simple password is specified in the Dockerfile to meet complexity requirements, override if you need this to be secure.
- SQL_USER : if specified will create a SQL login on master, and also a user on the database if SQL_DB is specified.
- SQL_PASSWORD : must be specified if SQL_USER is specified, as the password for this login.
- SQL_DB : if specified, will create a database on startup, including a user if SQL_USER and SQL_PASSWORD are specified.
Any backups *.bacpac
found in /init.bacpac
will be then be restored; the database name used will be the same as the file prefix.
Finally any scripts *.sql
found in /init.sql
will be executed. Any scripts should be idempotent, as they will be called each time the container starts up. Scripts can contain environment variables in standard bash format which will be expanded vy envsubst
before the script is run, see examples
directory.