Two flavors of Envoy Docker images, based on Ubuntu and Alpine Linux, are built.
The Ubuntu based Envoy Docker image at lyft/envoy-build:<hash> is used for Travis CI checks,
where <hash> is specified in ci_steps.sh. Developers
may work with lyft/envoy-build:latest to provide a self-contained environment for building Envoy binaries and
running tests that reflects the latest built Ubuntu Envoy image. Moreover, the Docker image
at lyft/envoy:<hash> is an image that has an Envoy binary at /usr/local/bin/envoy. The <hash>
corresponds to the master commit at which the binary was compiled. Lastly, lyft/envoy:latest contains an Envoy
binary built from the latest tip of master that passed tests.
Minimal images based on Alpine Linux allow for quicker deployment of Envoy. Two Alpine based images are built,
one with an Envoy binary with debug (lyft/envoy-alpine-debug) symbols and one stripped of them (lyft/envoy-alpine).
Both images are pushed with two different tags: <hash> and latest. Parallel to the Ubuntu images above, <hash> corresponds to the
master commit at which the binary was compiled, and latest corresponds to a binary built from the latest tip of master that passed tests.
The current build image is based on Ubuntu 16.04 (Xenial) which uses the GCC 5.4 compiler. We also install and use the clang-5.0 compiler for some sanitizing runs.
An example basic invocation to build a developer version of the Envoy static binary (using the Bazel fastbuild type) is:
./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.dev'The Envoy binary can be found in /tmp/envoy-docker-build/envoy/source/exe/envoy-fastbuild on the Docker host. You
can control this by setting ENVOY_DOCKER_BUILD_DIR in the environment, e.g. to
generate the binary in ~/build/envoy/source/exe/envoy-fastbuild you can run:
ENVOY_DOCKER_BUILD_DIR=~/build ./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.dev.server_only'For a release version of the Envoy binary you can run:
./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.release.server_only'The build artifact can be found in /tmp/envoy-docker-build/envoy/source/exe/envoy (or wherever
$ENVOY_DOCKER_BUILD_DIR points).
For a debug version of the Envoy binary you can run:
./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.debug.server_only'The build artifact can be found in /tmp/envoy-docker-build/envoy/source/exe/envoy-debug (or wherever
$ENVOY_DOCKER_BUILD_DIR points).
The ./ci/run_envoy_docker.sh './ci/do_ci.sh <TARGET>' targets are:
bazel.asan— build and run tests under-c dbg --config=clang-asanwith clang-5.0.bazel.debug— build Envoy static binary and run tests under-c dbg.bazel.debug.server_only— build Envoy static binary under-c dbg.bazel.dev— build Envoy static binary and run tests under-c fastbuildwith gcc.bazel.release— build Envoy static binary and run tests under-c optwith gcc.bazel.release.server_only— build Envoy static binary under-c optwith gcc.bazel.coverage— build and run tests under-c dbgwith gcc, generating coverage information in$ENVOY_DOCKER_BUILD_DIR/envoy/generated/coverage/coverage.html.bazel.tsan— build and run tests under-c dbg --config=clang-tsanwith clang-5.0.check_format— runclang-format3.6 andbuildifieron entire source tree.fix_format— run and enforceclang-format3.6 andbuildifieron entire source tree.