I have running sql server container with a file storage persistence in Azure instance container(ACI).
The sql server have some database connected located in the file storages and it is working perfectly until the container restart.
After restart all the database is gone from the sql server and i have to manually attach all the database again.
It is possible automatic attach all the databases again after a restart ?
I have tried with a template like this
"resources": [
{
"type": "Microsoft.ContainerInstance/containerGroups",
"apiVersion": "2018-10-01",
"name": "[parameters('containerGroups_mssql_2019_name')]",
"location": "WestEurope",
"properties": {
"containers": [
{
"name": "[parameters('containerGroups_mssql_2019_name')]",
"properties": {
"command": [
"/opt/mssql-tools/bin/sqlcmd",
"-l",
"60",
"-U",
"SA",
"-P",
"!thisWillMakeMyDayEveryDayIn2019",
"-i",
"/mnt/mydata/scripts/attach_all_databases.sql"
],
It does not work.
But if i execute the same command inside the container it works correctly.
Anyone who can give a direction ?
Thank you in advance
Mikael