Decrease proxy and web Docker image sizes#3384
Merged
Conversation
The `proxy` and `web` Docker images were 161MB and 186MB, respectively. Most of the space was tools installed into the `linkerd.io/base` image. Decrease `proxy` and `web` Docker images to 73MB and 90MB, respectively. Switch these images to be based off of `debian:stretch-20190812-slim`. Also set `-ldflags "-s -w"` for `proxy-identity` and `web`. Modify `linkerd.io/base` to also be based off of `debian:stretch-20190812-slim`, update tag to `2019-09-04.01`. Fixes #3383 Signed-off-by: Andrew Seigner <siggy@buoyant.io>
olix0r
reviewed
Sep 5, 2019
olix0r
approved these changes
Sep 5, 2019
Member
olix0r
left a comment
There was a problem hiding this comment.
This seems amenable to me. We'll probably want to call out the user-facing impacts of this in the CHANGES (specifically that the proxy no longer bundles debug tooling)
Merged
siggy
added a commit
to linkerd/linkerd2-proxy-init
that referenced
this pull request
Sep 5, 2019
The Dockerfile was built on `linkerd.io/base`, which included debug tools that increased its size. Build the Docker image directly on debian, only installing iptables. Also remove the dependency on `linkerd.io/go-deps`, and intead build directly off of golang, using Go Modules for dependencies. Similar to linkerd/linkerd2#3384 Signed-off-by: Andrew Seigner <siggy@buoyant.io>
siggy
added a commit
to linkerd/linkerd2-proxy-init
that referenced
this pull request
Sep 5, 2019
The Dockerfile was built on `linkerd.io/base`, which included debug tools that increased its size. Build the Docker image directly on debian, only installing iptables. Also remove the dependency on `linkerd.io/go-deps`, and instead build directly off of golang, using Go Modules for dependencies. Similar to linkerd/linkerd2#3384 Signed-off-by: Andrew Seigner <siggy@buoyant.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
proxyandwebDocker images were 161MB and 186MB, respectively.Most of the space was tools installed into the
linkerd.io/baseimage.Decrease
proxyandwebDocker images to 73MB and 90MB, respectively.Switch these images to be based off of
debian:stretch-20190812-slim.Also set
-ldflags "-s -w"forproxy-identityandweb. Modifylinkerd.io/baseto also be based off ofdebian:stretch-20190812-slim, update tag to2019-09-04.01.Fixes #3383
Signed-off-by: Andrew Seigner siggy@buoyant.io