demo: Updated docs and added socat forwarding container

Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
Rolf Neugebauer 2017-04-07 15:21:23 +01:00
parent 57f41c4b5a
commit 4520daa753
2 changed files with 21 additions and 0 deletions

View File

@ -27,6 +27,19 @@ cp Contents/MacOS/vpnkit /Applications/Docker.app/Contents/Resources/bin/
Restart Docker for Mac.
# Local setup
We use a `socat` container to forward ports from the VM to localhost (via Docker for Mac), to make it easier to access some VMs. To build
```
(cd dockerfiles; docker build -t socat -f Dockerfile.socat .)
```
And then run:
```
docker run --rm -t -d -p 8080:8080 socat tcp-listen:8080,reuseaddr,fork tcp:192.168.65.100:80
```
This forwards local port `8080` to `192.168.65.100:80`, so if you start, say the `intro` image, run `moby run -ip 196.168.65.100 intro`
# GCP Setup
You probably want to change the project/zone

View File

@ -0,0 +1,8 @@
# A dockerfile to build a socat container
#
# It sets the environment to talk to the local cluster
FROM alpine:edge
RUN apk add --no-cache socat
ENTRYPOINT [ "/usr/bin/socat" ]