mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
sync with README
This commit is contained in:
parent
27feba4594
commit
9875a9b1f1
1 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,8 @@ Expose a service on a TCP port
|
|||
|
||||
# Connect to the public port via the host's public address
|
||||
# Please note that because of how routing works connecting to localhost or 127.0.0.1 $PORT will not work.
|
||||
echo hello world | nc $(hostname) $PORT
|
||||
IP=$(ifconfig eth0 | perl -n -e 'if (m/inet addr:([\d\.]+)/g) { print $1 }')
|
||||
echo hello world | nc $IP $PORT
|
||||
|
||||
# Verify that the network connection worked
|
||||
echo "Daemon received: $(docker logs $JOB)"
|
||||
|
|
Loading…
Reference in a new issue