Is it possible to run sqlcmd inside a dockerfile?
First I am creating a layer
FROM microsoft/mssql-server-windows-developer:2017-latest
After that I accept the eula and set the sa password like this:
ENV ACCEPT_EULA=Y
ENV SA_PASSWORD=VerySecret!
After doing so I am trying to execute a simple sample query:
RUN sqlcmd -S "localhost" -U "SA" -P "VerySecret!" -Q "select name from master.dbo.sysdatabases"
Unfortunately the docker build command breaks with the error message "Sqlcmd: 'name from master.dbo.sysdatabases': Unexpected argument. Enter '-?' for help."
Am I doing something wrong?