Any attempt at this has failed. I have a large sql script in my laptop, and I want to run it in my docker container.
I believe I have to copy it first=:
docker cp ./my_cool_script.sql container_mssql_1:/my_cool_script.sql
This seems to run and doesn't give any success or failure so I assume its ok?
I then try:
docker exec container_mssql_1 -u sa psql databasename sa -f /my_cool_script.sql
but I just get:
rpc error: code = 2 desc = oci runtime error: exec failed: container_linux.go:262: starting container process caused "exec: \"-u\": executable file not found in $PATH"
Any ideas, or is there a better way to do this. The file is quite large (30MB).
Dockerfileto get a better idea of the context, specifically from which base image you're building.... Rather than "manually" doing thecpstep, you could add that to yourDockerfile(or a derivativeDockerfile).