I am new to container. I created one image of sql server for windows container by referring: https://github.com/microsoft/mssql-docker/tree/master/windows/mssql-server-windows-developer
I am able to connect to the server. Now I want to persist the data using volume so that I don't loose data on container deletion. The default path for linux is /var/opt/mssql and for windows is C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA. I am trying to run the below command where "my-sql-image" is the sql server image for windows:
docker run -d -p 1433:1433 -v sqlvolume:"c:\program` files\microsoft` sql` server\mssql15.mssqlserver\mssql\data" -e sa_password=****** -e ACCEPT_EULA=Y my-sql-image:2019
I tried modifying the path like all the characters in small case and escaping the spaces in the path by ticks and quotes. But when I delete the container, the data is not being persisted. Not sure what I am doing incorrect.