GoogleCloudPlatform / GoogleCloudPlatform/esp-v2

endpoints-runtime:2 containers are very large (1.34GB)

Open
#880 4 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
307
Forks
185
Avg merge
14h 45m
Merged PRs (30d)
6

Description

I noticed that the ESPv2 containers are much larger than the ones for ESPv1:
```
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
gcr.io/endpoints-release/endpoints-runtime 2 9af8d1152fa8 4 months ago 1.34GB
gcr.io/endpoints-release/endpoints-runtime 1 52a065a2c843 2 years ago 170MB
```

Nearly all of this is due to the envoy binary:
```
$ docker run -t -i --entrypoint /bin/sh gcr.io/endpoints-release/endpoints-runtime:2
/ $ ls -l /bin/envoy
-r-xr-xr-x 1 root root 1183328376 Oct 17 18:14 /bin/envoy
```

As a test, I ran `strip` on the envoy binary and the result was much smaller.
```
$ docker run -t -i --entrypoint /bin/sh ghcr.io/timburks/esp-v2:latest
/ $ ls -l /bin/envoy
-r-xr-xr-x 1 root root 34366336 Feb 19 22:05 /bin/envoy

$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ghcr.io/timburks/esp-v2 latest 81c2c28ace54 46 minutes ago 218MB
```

What do you think about adding `strip` to the official build process?

Contributor guide

Open the contributing guide

Research direction

Start by tracing the official build process that produces /bin/envoy in the endpoints-runtime:2 image, then compare the unstripped and stripped Docker image sizes shown in the report. Done means the official build includes the size reduction without breaking the runtime image.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.