Deploying an SQL Server container using Docker
Docker is a good deployment method for non-production containers. Persistent storage is achieved on Docker using volumes (https://docs.docker.com/storage/volumes/), which tell the container what to use and where to map it. This section will cover how to deploy a SQL Server container using Windows 10, the built-in Hyper-V feature, and Docker. If you are using another platform, you can adapt the instructions accordingly:
- Ensure Hyper-V is enabled.
- Install Docker.
- Configure Docker so that deployed containers can use at least 2 GB of memory. An example is shown in Figure 6.2:
Figure 6.2: Setting the memory to 2 GB in Docker
The default is 1 GB. If you do not configure this setting, you will get the following error when trying to create a container:
sqlservr: This program requires a machine with at least 2000 megabytes of memory. /opt/mssql/bin/sqlservr: This program requires a machine with at least 2000 megabytes of memory.
...