Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NETWORK-501 manual docker build process #55

Merged
merged 4 commits into from
Sep 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions example/Dockerfile-envoy-image
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions example/README.md
Original file line number Diff line number Diff line change
@@ -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_DIR>:/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`