docker run -d -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Mypassword@123" -e "MSSQL_PID=Express" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2017-latest-ubuntu
to connect docker container to run queries.
docker exec -it 922 /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Mypassword@123
You can connect to the database using dbeaver or sql server management studio externally.
Reference:
https://hub.docker.com/_/microsoft-mssql-server
No comments:
Post a Comment