I'm following the instructions here on how to connect to MS SQL Server using docker.
After running the container you need to connect to do some setup:
docker exec -it sql1 "bash"
/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd'
Create a database
CREATE DATABASE TestDB
GO
Then create a user
CREATE LOGIN TEST_USER WITH PASSWORD = 'YourStrong!Passw0rd'
GO
QUIT
Maybe you want to do a few other things like sp_addrolemember to be owner or other some such.
Is it possible to script these steps or combine it into single command?
e.g. run the docker command with the sqlcmd as a parameter and the required sql in a file as a parameter to that?
I don't want to compose my own container with these changes in.