Docker Community Forums

Share and learn in the Docker community.

Requesting help on learning Docker

Hi All,

I am new and learning docker. Below is what I am trying with ports, and need some help understanding what I am doing wrong. I am using Docker Desktop on Windows 10 and Command Prompt

I am not able to get UDP working. Previously I was able to get working with dynamic port in and out.

Server Command
docker run --rm -ti -p 45678/udp --name echo-server ubuntu:14.04 bash

Cmd promt
docker port echo-server
45678/udp →

Server Command
nc -ulp 57033

These are the 3 options I tried

Option 1 Client: - Failed nc not recognized command
nc host.docker.internal 57033

Option 2 Client: - Failed nc not recognized command
nc localhost 57033

Option 3 Client: - With out using UDP I was able to use the below. No when I run this it stays open only for a few sec for entry and it doesn’t post to server.

docker run --rm -ti ubuntu:14.04 bash
nc host.docker.internal 57033

After I type something in a few seconds later it comes back to same command line inside the container it typed it in.

root@431a77e7ff82:/# nc host.docker.internal 57033
root@431a77e7ff82:/# test

I am expecting “test” to have shown up on the server container but nothing showed up
C:\WINDOWS\system32>docker run --rm -ti -p 45678/udp --name echo-server ubuntu:14.04 bash
root@90dfc2817cb6:/# nc -ulp 57033

Thank you much for any help.