mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 01:29:07 +00:00
demo: Update README
latest DfM has all the bits you need... Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
parent
d526707240
commit
8462e34d6e
@ -5,40 +5,13 @@ This directory contains files used in moby demos.
|
||||
Most of the scripts/files assume you are on a Mac.
|
||||
|
||||
- Recent Docker for Mac installed (edge, nightly, master channel)
|
||||
- Currently, you need a *custom* version of VPNKit installed in Docker
|
||||
for Mac (see below)
|
||||
For some of the demo setup, you need at least 17.05.0-ce-rc1
|
||||
- For the GCP portion: `brew install google-cloud-sdk`
|
||||
- For `etcd`: `brew install etcd`
|
||||
- Infrakit: Clone [infrakit](https://github.com/docker/infrakit) and
|
||||
the [GCP plugin](https://github.com/docker/infrakit.gcp) for
|
||||
infrakit. For each, `make build-in-container` and then copy the
|
||||
contents of `./build` somewhere in your path.
|
||||
|
||||
For some of the demos, you currently need an updated version of VPNKit
|
||||
for Docker for Mac. Hopefully this version will ship as default soon.
|
||||
|
||||
Quit docker for Mac
|
||||
```
|
||||
curl -fsSL --retry 10 -z vpnkit.tgz -o vpnkit.tgz https://circle-artifacts.com/gh/docker/vpnkit/708/artifacts/0/Users/distiller/vpnkit/vpnkit.tgz
|
||||
|
||||
tar xzvf vpnkit.tgz
|
||||
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`
|
||||
|
||||
infrakit. The GCP plugin, needs to be v0.1. For each, `make
|
||||
build-in-container` and then copy the contents of `./build`
|
||||
somewhere in your path.
|
||||
|
||||
# GCP Setup
|
||||
|
||||
@ -63,3 +36,14 @@ gcloud compute firewall-rules create rneugeba-demo-internal --network \
|
||||
The firewall setup means that all our projects networks can talk to the demo network.
|
||||
|
||||
|
||||
# Expose VMs ports on localhost
|
||||
|
||||
You can 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`
|
||||
|
Loading…
Reference in New Issue
Block a user