Ubuntu
docker
MSSQL
ubuntu18.04

How to Run Docker MSSQL 2017 Image in Ubuntu 18.04 LTS?

1. Run docker command.

$ sudo docker run -e 'ACCEPT_EULA=Y' /
                  -e 'MSSQL_SA_PASSWORD=XXXX' /
                  -p 1433:1433 /
                  --name mssql /
                  -d microsoft/mssql-server-linux:2017-latest

MSSQL_SA_PASSWORD=XXXX, XXXX is your database password.

Unable to find image 'microsoft/mssql-server-linux:2017-latest' locally
2017-latest: Pulling from microsoft/mssql-server-linux
f6fa9a861b90: Pull complete 
da7318603015: Pull complete 
6a8bd10c9278: Pull complete 
d5a40291440f: Pull complete 
bbdd8a83c0f1: Pull complete 
3a52205d40a6: Pull complete 
6192691706e8: Pull complete 
1a658a9035fb: Pull complete 
655776156720: Pull complete 
0c695ca332a2: Pull complete 
Digest: sha256:09a9386e0484667b0490069bc854dcd72c2e1a85d342d1d798aced91f5e1aa81
Status: Downloaded newer image for microsoft/mssql-server-linux:2017-latest
61c211c3264d0f8e4b9d65af83702a8532245ff35641b724a72d5b9054f7a7a4

2. Check docker status

$ sudo docker ps -a

CONTAINER ID        IMAGE                                      COMMAND                  CREATED             STATUS              PORTS                    NAMES
61c211c3264d        microsoft/mssql-server-linux:2017-latest   "/opt/mssql/bin/sqls…"   3 hours ago         Up About an hour    0.0.0.0:1433->1433/tcp   mssql

https://hub.docker.com/r/microsoft/mssql-server-linux/
https://segmentfault.com/a/1190000011653540
https://dotblogs.com.tw/swater111/2017/01/16/183653
https://docs.microsoft.com/zh-tw/sql/linux/quickstart-install-connect-docker?view=sql-server-linux-2017