Score:-1

Trying to access sql server publicly on Ubuntu 22.04 in Docker

tl flag

SOLUTION: Need to forward the port you set up when creating the image, mine was the default 1433, sending your IP address, the same you might SSH. See my answer for more info and links if you are starting out from scratch

I've set up a developer version of SQL Server 2019 on my Ubuntu 22.04. I had issues setting it up directly, so have set up a docker container and installed 20.04 and SQL server following this method.

I have been able to set up tables, and access locally from SSMS from other computers on the network, but I can't work out how to setup the ability to give others access from outside the network.

I have set up SSH and can access that successful from outside the network. I See there is an IP for the Docker container and one for the local machine.

Any help is welcomed, happy to try any ideas you have.

Score:0
tl flag

For anyone struggling with this, I solved my own issue - It was a very basic error.

It was a port forwarding issue, I had tried this early on but set up something incorrectly. After trying several approaches and watching hours of youtube, I circled back to where I started.

SOLUTION: Need to forward the port you set up when creating the image, mine was the default 1433, sending your IP address, the same you might SSH.

You can then connect using your public IP and credentials to set up when creating the container and image in SSMS or your program of choice.

This video was great to help me understand more about dockers but wasn't the solution I needed. When I found this page, it helped me understand the container better and that it was already ready for the incoming connection.

Although the process was painful, I have a better understanding of the problem now. I hope this helps someone else.

FYI for those starting from scratch:

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.