Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to expose ports? #155

Open
Lexian-droid opened this issue Jan 2, 2023 · 0 comments
Open

How to expose ports? #155

Lexian-droid opened this issue Jan 2, 2023 · 0 comments

Comments

@Lexian-droid
Copy link

Hello, I'm a little new to docker, and thus docker-wine.
I am sorry if this isn't the right place to ask, but I cannot find a support server anywhere, also there is a distinct lack of a questions template.

I was wondering, does anyone know how to expose a port on Docker-wine? I am running a custom server on my ubuntu server, which I developed, I can't seem to figure out how to expose the port, I tried a command in docker, but that didn't work.

Whenever I do the command, the "ls" command doesn't change. I'm just quite confused, if anyone could help me it would be greatly appreciated. Thank you.

And, I do know that the port is not exposed, and it's not my firewall, as when you're in the console, and try to do curl localhost:port it doesn't get anything, just an error message.

Here is the error:

# curl localhost:1040
curl: (7) Failed to connect to localhost port 1040: Connection refused

If I write the docker's IP however:

# curl 172.17.0.2:1040
Welcome to my site!

It works just fine, so I believe it is not my firewall, simply it's just not working. If I enter the command to expose the port:

# docker container run -d --expose 1040 scottyhardy/docker-wine
2bc1ec223e04dcfd41c57abaffd649a6fe71670030309097c2069c78249881eb

It works, but when I do the docker container ls command, it doesn't show it as the port being exposed.
Overall, I'm just quite confused, so if anyone could help me out, it would be greatly appreciated, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant