Coverting yml to JSON for people using docker compose
[from: @beaudryj] I wonder if it would be possible to refactor this in a way to have the script convert the yml down to JSON for people using docker compose.
ex: services: db: image: microsoft/mssql-server-windows-express environment: sa_password: "Password1" ACCEPT_EULA: "Y" attach_dbs: dbname: sampledb dbfiles: '["C:\temp\sample.mdf","C:\temp\sample_log.ldf"]' ports: - "1433:1433" # REMARK: This is currently required, needs investigation
I'm having the same problems described by perrysk-msft in:
https://github.com/Microsoft/mssql-docker/issues/40
In spite of trying all of the various suggested combinations of slash behavior, I cannot seem to make attach_dbs work properly with docker-compose.
Will continue investigating and I'm sure I'll be able to find a workaround. However, I wanted to voice support for this request as it seems like a relatively common problem.
Best thing I did was do this as a regular dockerfile, have the docker file set my attach DBs, ran the start.ps1 without the while loop and stopped the DB after the run and then store that as a new docker image I reference in my compose