Windows server 2019 microsoft/mssql-server-linux - machine with at least 2000 megabytes of memory

Viewed 347

I am running docker on windows server 2019 that uses windows containers and I enabled linux containers. It works perfectly except SQL server.

version: "3.7"

services:
  sql-server-db:
    image: microsoft/mssql-server-linux
    container_name: sql-server-db
    mem_limit: 4GB
    environment:
      - SA_PASSWORD=${dbPassword}
      - ACCEPT_EULA=Y
      - MSSQL_PID=Developer
      - MSSQL_MEMORY_LIMIT_MB=4048
    ports:
      - "1439:1433"
    restart: on-failure

When I try start this container I receive such an error:

sqlservr: This program requires a machine with at least 2000 megabytes of memory.

I tested this configuration on Windows 10 with windows containers and it works.

Any thoughts?

1 Answers

You need to increase in Docker the RAM assigned to VMs on Linux, if I remember correctly the mem_limit isn't the one you need to set. Also the Swap needs to be increased.

Related