If the STATUS column shows a status of Up, then SQL Server is running in the container and listening on the port specified in the PORTS column. To view your Docker containers, use the docker ps command. This is used to persist the data created by SQL Server. The optional -v sql1data:/var/opt/mssql parameter creates a data volume container named sql1ddata.
SQL Server port 1433 is exposed on the host as port 1401. This command creates a SQL Server 2019 container with the Developer edition (default). For example, you can mount a host directory using -v on Mac and restore a backup from a. Reading from a mounted directory works fine. This restriction is specific to the /var/opt/mssql directory. Host volume mapping for Docker on Mac with the SQL Server on Linux image is not supported at this time. However, you can map a subdirectory, such as /var/opt/mssql/data to your host machine. Host volume mapping for Docker on Windows does not currently support mapping the complete /var/opt/mssql directory.