Skip to content

Instantly share code, notes, and snippets.

@jjuanrivvera99
Last active April 13, 2025 08:06
Show Gist options
  • Save jjuanrivvera99/e4357795b5f9ba239533fbd849bd008e to your computer and use it in GitHub Desktop.
Save jjuanrivvera99/e4357795b5f9ba239533fbd849bd008e to your computer and use it in GitHub Desktop.
SQL Server with Docker Compose
version: '3.3'
services:
mssql:
container_name: sql-server
image: mcr.microsoft.com/mssql/server:2017-latest
#image: mcr.microsoft.com/mssql/server:2017-CU11-ubuntu
restart: always
environment:
ACCEPT_EULA: "Y"
SA_PASSWORD: "Contraseña12345678"
ports:
- 1433:1433
volumes:
- my-volume:/var/opt/mssql
volumes:
my-volume:
@wildwind123
Copy link

after add this option, work, but this developer mode

MSSQL_PID: "Developer"
version: '3.3'

services:
  mssql:
    container_name: sql-server
    image: mcr.microsoft.com/mssql/server:2017-latest
    restart: always
    environment:
      ACCEPT_EULA: "Y"
      SA_PASSWORD: "YourStrong!Passw0rd"
      MSSQL_LOGGING: "verbose"
      MSSQL_PID: "Developer"
    ports:
      - 1433:1433
    volumes:
      - ./data:/var/opt/mssql/data
      - ./3:/backup
    deploy:
      resources:
        limits:
          cpus: '2'
          memory: 4G

@mreinhart2805
Copy link

This has something to do with the license plan. Admittedly, the name 'MSSQL_PID' is an unfortunate choice by Microsoft. But that's how we know it.

You can see the valid values ​​here:

https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-ver16#environment-variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment