Skip to content

Instantly share code, notes, and snippets.

@leomartinsdev
Last active April 4, 2024 21:35
Show Gist options
  • Save leomartinsdev/f077f571bb5a126e5af261b5f658d9b0 to your computer and use it in GitHub Desktop.
Save leomartinsdev/f077f571bb5a126e5af261b5f658d9b0 to your computer and use it in GitHub Desktop.
docker-compose for Microsoft SQL Server

Multiple docker-compose examples to set up databases on a docker container.

Microsoft SQL Server

version: '3'
services:
  db:
    image: mcr.microsoft.com/azure-sql-edge:latest
    container_name: ms_sql_server
    ports:
        - 1433:1433
    environment:
      - ACCEPT_EULA=Y
      - MSSQL_SA_PASSWORD=SqlServer123!
      - MSSQL_PID=Developer

MySQL

version: '3'
services:
  db:
    image: mysql:8.0.32
    container_name: store_manager_db
    environment:
      MYSQL_USER: user
      MYSQL_ROOT_PASSWORD: password
      MYSQL_DATABASE: StoreManager
    ports:
      - 3306:3306
    restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment