please following to step below before running docker-compose
- setup .env file for MSSQL Server "SA" Password . (password="password")
- chmod a+x up.sh & ./up.sh
- to reset docker volume and reset docker-compose images (incase you want to change "SA" password)
- docker system prune -a for remove all existing docker instance
-
sudo docker exec -t {container id} mkdir /var/opt/mssql/backup
-
sudo docker cp {backup file} {container id}:/var/opt/mssql/backup
-
sudo docker exec -it {container id} /bin/bash
-
use SSMS to restore database or cmd below
sudo docker exec -it {container id} /opt/mssql-tools/bin/sqlcmd -S localhost \ -U SA -P '<YourNewStrong!Passw0rd>' \ -Q 'RESTORE FILELISTONLY FROM DISK = "/var/opt/mssql/backup/wwi.bak"' \ | tr -s ' ' | cut -d ' ' -f 1-2
password=xxxx // no quote required.
docker volume ls
docker volume rm <name_of_volume>
docker-compose stop
docker-compose rm
docker rm $(docker ps -a -q) -f
https://docs.microsoft.com/en-us/sql/azure-data-studio/download?view=sql-server-2017