Installing SQL Server Express On Linux
Table of Contents
1. Synopsis
This document describes the installation procedure for SQL Server Express on Linux using Docker Container.
This free version will allow for DB sizes up to 10GB.
2. Install
-
Create a docker compose file named
compose.ymlwith the following contents:version: '3.7' services: # Define MSSQL mssql: container_name: MSSQL-DB image: mcr.microsoft.com/mssql/server:2019-latest environment: - TZ=America/New_York - PUID=0 - PGID=0 - MSSQL_PID=Express - ACCEPT_EULA=Y - MSSQL_SA_PASSWORD=${MSSQL_SA_PASSWORD} ports: - 1285:1433 #External port is 1285 volumes: # Before starting this container # You need to create this directory manually and then # chmod 777 - ./MSSQL-data:/var/opt/mssql restart: always -
Create an
.envfile containing thesapassword:echo MSSQL_SA_PASSWORD=The-SA-Pass0rd > .env -
Create a data directory e.g.,
MSSQL-data-
Make the data directory
mkdir MSSQL-data -
Change permissions
chmod 777 MSSQL-data
-
-
Start the container
sudo docker-compose up -d
