Skip to content

Instantly share code, notes, and snippets.

@nicklaslof
Created October 22, 2015 17:10
Show Gist options
  • Save nicklaslof/ee9d19b23643025e0a15 to your computer and use it in GitHub Desktop.
Save nicklaslof/ee9d19b23643025e0a15 to your computer and use it in GitHub Desktop.
# docker run -p 80:80 -d busybox nc -l -p 80
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5b59f7ab76f2 busybox "nc -l -p 80" 13 seconds ago Up 1 seconds 172.17.1.81:80->80/tcp swarmnode2/focused_mahavira
# telnet 172.17.1.81 80
Trying 172.17.1.81...
Connected to 172.17.1.81.
Escape character is '^]'.
# docker run --net=multihost -p 80:80 -d busybox nc -l -p 80
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
225b5ed6eae3 busybox "nc -l -p 80" 14 seconds ago Up 2 seconds swarmnode2/adoring_cori
# telnet 172.17.1.81 80
Trying 172.17.1.81...
telnet: Unable to connect to remote host: Connection refused
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment