Merge pull request #18651 from ejona86/interop-reduce-java-size

grpc_interop_java: Remove unnecessary cruft from container
pull/18690/head
Eric Anderson 6 years ago committed by GitHub
commit 48a50fb7c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile.include
  2. 13
      templates/tools/dockerfile/interoptest/grpc_interop_java_oracle8/java_deps.include
  3. 16
      templates/tools/dockerfile/java_build_interop.sh.include
  4. 35
      tools/dockerfile/interoptest/grpc_interop_java/Dockerfile
  5. 16
      tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh
  6. 35
      tools/dockerfile/interoptest/grpc_interop_java_oracle8/Dockerfile
  7. 16
      tools/dockerfile/interoptest/grpc_interop_java_oracle8/build_interop.sh

@ -15,13 +15,6 @@
<%include file="../../debian_jessie_header.include"/>
<%include file="java_deps.include"/>
<%include file="../../python_deps.include"/>
# Trigger download of as many Gradle artifacts as possible.
RUN git clone --recursive --depth 1 https://github.com/grpc/grpc-java.git && ${'\\'}
cd grpc-java && ${'\\'}
./gradlew :grpc-interop-testing:installDist -PskipCodegen=true && ${'\\'}
rm -r "$(pwd)"
# Define the default command.
CMD ["bash"]
CMD ["bash"]

@ -1,16 +1,11 @@
# Install JDK 8 and Git
# Install JDK 8
#
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && ${'\\'}
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'}
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && ${'\\'}
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
RUN apt-get update && apt-get -y install ${'\\'}
git ${'\\'}
libapr1 ${'\\'}
oracle-java8-installer ${'\\'}
&& ${'\\'}
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && ${'\\'}
apt-get update && apt-get -y install oracle-java8-installer && ${'\\'}
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin

@ -16,16 +16,24 @@
# Builds Java interop server and client in a base image.
set -e
mkdir -p /var/local/git
git clone --recursive --depth 1 /var/local/jenkins/grpc-java /var/local/git/grpc-java
cp -r /var/local/jenkins/grpc-java /tmp/grpc-java
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc-java
pushd /tmp/grpc-java
./gradlew :grpc-interop-testing:installDist -PskipCodegen=true
mkdir -p /var/local/git/grpc-java/
cp -r --parents -t /var/local/git/grpc-java/ ${'\\'}
interop-testing/build/install/ ${'\\'}
run-test-client.sh ${'\\'}
run-test-server.sh
popd
rm -r /tmp/grpc-java
rm -r "$HOME/.gradle"
# enable extra java logging
mkdir -p /var/local/grpc_java_logging
echo "handlers = java.util.logging.ConsoleHandler

@ -16,45 +16,20 @@ FROM debian:jessie
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
# Install JDK 8 and Git
# Install JDK 8
#
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
RUN apt-get update && apt-get -y install \
git \
libapr1 \
oracle-java8-installer \
&& \
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
apt-get update && apt-get -y install oracle-java8-installer && \
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin
#====================
# Python dependencies
# Install dependencies
RUN apt-get update && apt-get install -y \
python-all-dev \
python3-all-dev \
python-pip
# Install Python packages from PyPI
RUN pip install --upgrade pip==10.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
# Trigger download of as many Gradle artifacts as possible.
RUN git clone --recursive --depth 1 https://github.com/grpc/grpc-java.git && \
cd grpc-java && \
./gradlew :grpc-interop-testing:installDist -PskipCodegen=true && \
rm -r "$(pwd)"
# Define the default command.
CMD ["bash"]

@ -16,16 +16,24 @@
# Builds Java interop server and client in a base image.
set -e
mkdir -p /var/local/git
git clone --recursive --depth 1 /var/local/jenkins/grpc-java /var/local/git/grpc-java
cp -r /var/local/jenkins/grpc-java /tmp/grpc-java
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc-java
pushd /tmp/grpc-java
./gradlew :grpc-interop-testing:installDist -PskipCodegen=true
mkdir -p /var/local/git/grpc-java/
cp -r --parents -t /var/local/git/grpc-java/ \
interop-testing/build/install/ \
run-test-client.sh \
run-test-server.sh
popd
rm -r /tmp/grpc-java
rm -r "$HOME/.gradle"
# enable extra java logging
mkdir -p /var/local/grpc_java_logging
echo "handlers = java.util.logging.ConsoleHandler

@ -16,45 +16,20 @@ FROM debian:jessie
RUN sed -i '/deb http:\/\/deb.debian.org\/debian jessie-updates main/d' /etc/apt/sources.list
# Install JDK 8 and Git
# Install JDK 8
#
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
RUN apt-get update && apt-get -y install \
git \
libapr1 \
oracle-java8-installer \
&& \
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
apt-get update && apt-get -y install oracle-java8-installer && \
apt-get clean && rm -r /var/cache/oracle-jdk8-installer/
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV PATH $PATH:$JAVA_HOME/bin
#====================
# Python dependencies
# Install dependencies
RUN apt-get update && apt-get install -y \
python-all-dev \
python3-all-dev \
python-pip
# Install Python packages from PyPI
RUN pip install --upgrade pip==10.0.1
RUN pip install virtualenv
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
# Trigger download of as many Gradle artifacts as possible.
RUN git clone --recursive --depth 1 https://github.com/grpc/grpc-java.git && \
cd grpc-java && \
./gradlew :grpc-interop-testing:installDist -PskipCodegen=true && \
rm -r "$(pwd)"
# Define the default command.
CMD ["bash"]

@ -16,16 +16,24 @@
# Builds Java interop server and client in a base image.
set -e
mkdir -p /var/local/git
git clone --recursive --depth 1 /var/local/jenkins/grpc-java /var/local/git/grpc-java
cp -r /var/local/jenkins/grpc-java /tmp/grpc-java
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc-java
pushd /tmp/grpc-java
./gradlew :grpc-interop-testing:installDist -PskipCodegen=true
mkdir -p /var/local/git/grpc-java/
cp -r --parents -t /var/local/git/grpc-java/ \
interop-testing/build/install/ \
run-test-client.sh \
run-test-server.sh
popd
rm -r /tmp/grpc-java
rm -r "$HOME/.gradle"
# enable extra java logging
mkdir -p /var/local/grpc_java_logging
echo "handlers = java.util.logging.ConsoleHandler

Loading…
Cancel
Save