Skip to content

Instantly share code, notes, and snippets.

@jmprusi
Last active December 21, 2017 15:59
Show Gist options
  • Save jmprusi/d92126458f4ba5bafd2c232dca84be92 to your computer and use it in GitHub Desktop.
Save jmprusi/d92126458f4ba5bafd2c232dca84be92 to your computer and use it in GitHub Desktop.
Building Istio dockers from macOS

Building Istio dockers from macOS

Get istio src.

  • Download istio source
git clone https://github.com/istio/istio

Build the Dockerfile

  • Copy the Dockerfile into the istio dir, and build it
docker build -t istio-builder:latest -f Dockerfile .

Build docker images

  • Enter the istio dir:
cd istio-dir
  • Use the previous docker and build the docker images:
docker run --rm -ti --workdir=/go/istio.io/istio \
                     -v /var/run/docker.sock:/var/run/docker.sock \
                     -v "$(pwd)/:/go/istio.io/istio/" \
                     istio-builder:latest \
                     make clean docker

Enjoy your new docker images

  • Check docker images:
docker images

REPOSITORY                                 TAG                                        IMAGE ID            CREATED             SIZE
grafana                                    latest                                     efd187d40108        13 minutes ago      292MB
eurekamirror                               latest                                     c67c3055dbb4        14 minutes ago      31.1MB
gcr.io/istio-testing/eurekamirror          root_171212_184652                         c67c3055dbb4        14 minutes ago      31.1MB
sidecar_initializer                        latest                                     3bf5446bfcab        14 minutes ago      31.5MB
gcr.io/istio-testing/sidecar_initializer   root_171212_184652                         3bf5446bfcab        14 minutes ago      31.5MB
pilot                                      latest                                     22c20e9cbcd8        14 minutes ago      33.7MB
gcr.io/istio-testing/pilot                 root_171212_184652                         22c20e9cbcd8        14 minutes ago      33.7MB
gcr.io/istio-testing/proxy_debug           root_171212_184652                         d6cbf57d8e3b        14 minutes ago      443MB
proxy_debug                                latest                                     d6cbf57d8e3b        14 minutes ago      443MB
proxy_init                                 latest                                     ed074d7cd3fe        14 minutes ago      121MB
gcr.io/istio-testing/proxy_init            root_171212_184652                         ed074d7cd3fe        14 minutes ago      121MB
proxy                                      latest                                     463e3db4a994        14 minutes ago      409MB
gcr.io/istio-testing/proxy                 root_171212_184652                         463e3db4a994        14 minutes ago      409MB
app                                        latest                                     f3f4b83f2209        15 minutes ago      18.6MB
gcr.io/istio-testing/app                   root_171212_184652                         f3f4b83f2209        15 minutes ago      18.6MB
node-agent-test                            latest                                     aa6c26571184        17 minutes ago      152MB
gcr.io/istio-testing/node-agent-test       root_171212_184303                         aa6c26571184        17 minutes ago      152MB
istio-ca-test                              latest                                     e269b1b5dbb9        17 minutes ago      154MB
gcr.io/istio-testing/istio-ca-test         root_171212_184303                         e269b1b5dbb9        17 minutes ago      154MB
istio-ca                                   latest                                     e176b5887137        17 minutes ago      200MB
gcr.io/istio-testing/istio-ca              root_171212_184303                         e176b5887137        17 minutes ago      200MB
gcr.io/istio-testing/envoy                 a09fc9fc389333b888c3ab1ebf1f79c923a3d0e3   6cfc4b833a1e        3 days ago          396MB
gcr.io/istio-testing/envoy-debug           a09fc9fc389333b888c3ab1ebf1f79c923a3d0e3   20909402002e        3 days ago          430MB
ubuntu                                     xenial                                     20c44cd7596f        3 weeks ago         123MB
gcr.io/istio-testing/iptables              20170725-5a9fbbf                           c8be2ffd20f1        4 months ago        121MB
gcr.io/istio-testing                       ubuntu_xenial_debug                        e055899ad067        9 months ago        234MB
grafana/grafana                            4.1.2                                      b949fa39c923        9 months ago        275MB
istio/mixer/example/servicegraph/docker    servicegraph                               557f9e0dce0a        47 years ago        138MB
servicegraph                               latest                                     557f9e0dce0a        47 years ago        138MB
istio/mixer/docker                         mixer                                      f98b234d49d4        47 years ago        171MB
mixer                                      latest                                     f98b234d49d4        47 years ago        171MB
istio/mixer/docker                         mixer_debug                                c53d9c9cfa04        47 years ago        276MB
mixer_debug                                latest                                     c53d9c9cfa04        47 years ago        276MB
FROM ubuntu:xenial
# This Dockerfile has been taken from:
# https://github.com/nmnellis/istio/blob/access-logging/ci/Dockerfile
RUN apt-get update \
&& apt-get install -y openjdk-8-jdk make libtool m4 autoconf uuid-dev cmake golang-go curl python python-pip git \
&& echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list \
&& curl https://bazel.build/bazel-release.pub.gpg | apt-key add - \
&& apt-get update \
&& apt-get -y install bazel \
&& curl -sSL https://get.docker.com/ | sh \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /go/src/istio.io/istio \
&& mkdir -p /root/.kube \
&& touch /root/.kube/config
ENV GOPATH=/go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment