Omar-7550 avatar image
0 Votes"
Omar-7550 asked SandervandeVelde42 commented

accessing mssql instance from another module

When attempting to access a SQL container instance from a .NET 6 application the following error occurs. Both containers are initialized by a deployment manifest json.

 sql docker container remote certificate was rejected by the provided RemoteCertificateValidationCallback
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @Omar-7550,

which Sql container are you using? How did you config the related create options?

Are you following some kind of tutorial?

I recommend testing first for the Sql container to see if it's running as expected.

In the past, I used "Microsoft Command Line Utilities 14.0 for SQL Server" to test the connection.

0 Votes 0 ·

using sql server 2017 at the deployment manifest:

           "mssql": {
             "version": "1.0",
             "type": "docker",
             "status": "running",
             "restartPolicy": "always",
             "startupOrder": 1,
             "settings": {
               "image": "",
               "createOptions": "{\"Env\": [\"ACCEPT_EULA=Y\",\"MSSQL_SA_PASSWORD=password\"],\"HostConfig\": {\"LogConfig\": {\"Type\": \"json-file\",\"Config\": {\"max-size\": \"10m\",\"max-file\": \"3\"}},\"PortBindings\": {\"1433/tcp\": [{\"HostPort\": \"1433\"}]},\"Mounts\": [{\"Type\": \"volume\",\"Source\": \"sqlVolume\",\"Target\": \"/var/opt/mssql\"}]}}"

Is it necessary to utilize a different port number than the HostPort at the PortBindings?

0 Votes 0 ·

Hello @Omar-7550,

the mapping between the port number inside the container and outside the container (on host level) is a convenient solution to have the same container run twice side-by-side.

Normally, this is not possible, a port can only be used once. But now you can, with two different host port numbers.

0 Votes 0 ·

0 Answers