From d1bd39215e1b9dc3c649cf031bc2f566b22200c6 Mon Sep 17 00:00:00 2001 From: Jose Ulises Nino Rivera Date: Fri, 9 Sep 2016 09:38:39 -0700 Subject: [PATCH] NETWORK-501 manual docker build process (#55) update documentation --- example/Dockerfile-envoy-image | 6 ++++++ example/README.md | 36 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 example/Dockerfile-envoy-image diff --git a/example/Dockerfile-envoy-image b/example/Dockerfile-envoy-image new file mode 100644 index 000000000000..53114b843303 --- /dev/null +++ b/example/Dockerfile-envoy-image @@ -0,0 +1,6 @@ +FROM ubuntu:14.04 + +ADD build/source/exe/envoy /usr/local/bin/envoy +RUN apt-get update && apt-get install -y \ + curl \ + python-pip diff --git a/example/README.md b/example/README.md index af297eda7d2f..29a18ceba7c3 100644 --- a/example/README.md +++ b/example/README.md @@ -1,2 +1,38 @@ To learn about this sandbox and for instructions on how to run it please head over to the envoy docs + +### Building the Docker image + +The `lyft/envoy` image is a docker image made using `build-envoy/Dockerfile-envoy` +it copies a precompiled envoy binary into a docker image, and installs `curl` +and `pip`. + +The following steps guide you through building your own envoy binary, and +putting that in a clean ubuntu container. + +#### Step 1: Build Envoy + +Using `lyft/envoy-buld` you will compile envoy. +This image has all software needed to build envoy. From your envoy directory: + +```shell +$ pwd +src/envoy +$ docker run -t -i -v :/source lyft/envoy-build:latest /bin/bash -c "cd /source && ci/do_ci.sh normal" +``` + +That command will take some time to run because it is compiling an envoy binary. + +#### Step 2: Build image with only envoy binary + +In this step we'll build an image that only has the envoy binary, and none +of the software used to build it. + +```shell +$ pwd +src/envoy/ +$ docker build -f example/Dockerfile-envoy-image -t envoy . +``` + +Now you can use this `envoy` image to build the demo if you change the `FROM` +line in `Dockerfile-frontenvoy` and `Dockerfile-service`