This reduces the container size from 1.4 GB to 640 MB. 129 MB is
jessie, 489 MB jdk, and 22 MB grpc-java. When we swap from jessie to
stretch, we could swap to openjdk:8-jdk-slim-stretch which would make
the entire image 265 MB.
Python was never needed; it was added by mistake in 0589e533.
Pre-downloading gradle artifacts isn't helpful these days, because we
build on a clean machine. Git isn't needed as cp is sufficient. libapr1
has not been required by tcnative for a long time, and we even use
tcnative-boringssl-static since at least 1.0, which also doesn't need
it. The final cleanup is to remove source and downloaded artifacts when
done compiling.
six is necessary for making these scripts cross compatible
between python 2.x and 3.x
Changes:
Add six to python_deps.include
Include python_deps.include to all Dockerfile templates in test directory
Include python_deps.include to all Dockerfile templates in stress_test directory
Include python_deps.include to all Dockerfile templates in interop_test directory
Replace print statements with print function calls (from futute..)
Replace .iteritems() with .items() wherever necessary
use six.moves to import BaseHTTPServer
Generate new dockerfiles using generate_projects.sh
We commit the codegen into Git, so it is already available. Travis-CI is
testing the codegen, so we don't need to test it as part of interop
tests.
This means we no longer need a C compiler installed, so we stop using
grpc/base.
The images seem to have been broken starting with 12e12a3, but the
removal of Maven support from grpc-java also broke them further.
SSH handling no longer uses $HOME as it does not agree with /etc/passwd
in older docker versions[1] and prevented SSH from seeing the config
file.
Some effort was also made to reduce the image sizes by removing
temporary files.
1. https://github.com/docker/docker/issues/2968