mssql-docker icon indicating copy to clipboard operation
mssql-docker copied to clipboard

Coverting yml to JSON for people using docker compose

Open perrysk-msft opened this issue 9 years ago • 2 comments

[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

perrysk-msft avatar Mar 08 '17 20:03 perrysk-msft

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.

bstreitATX avatar Jan 28 '18 17:01 bstreitATX

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

beaudryj avatar Jan 28 '18 20:01 beaudryj