Here is the Dockerfile with only Java that I've posted on the tickets comment. Note that I've also removed unnecessary libs from the JDK and from the OS.
In fact, this image has already been pushed to DockerHub and can be used with: docker pull apachegeode/java8 FROM centos:latest MAINTAINER William Markito <[email protected]> LABEL Vendor="Apache Geode (incubating)" LABEL version=unstable # download JDK 8 ENV JAVA_HOME /jdk1.8.0_51 RUN yum install -y wget which tar git \ && wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u51-b16/jdk-8u51-linux-x64.tar.gz" \ && tar xf jdk-8u51-linux-x64.tar.gz \ && rm -rf /jdk-8u51-linux-x64.tar.gz \ && rm -rf $JAVA_HOME/*src.zip \ $JAVA_HOME/lib/missioncontrol \ $JAVA_HOME/lib/visualvm \ $JAVA_HOME/lib/*javafx* \ $JAVA_HOME/jre/lib/plugin.jar \ $JAVA_HOME/jre/lib/ext/jfxrt.jar \ $JAVA_HOME/jre/bin/javaws \ $JAVA_HOME/jre/lib/javaws.jar \ $JAVA_HOME/jre/lib/desktop \ $JAVA_HOME/jre/plugin \ $JAVA_HOME/jre/lib/deploy* \ $JAVA_HOME/jre/lib/*javafx* \ $JAVA_HOME/jre/lib/*jfx* \ $JAVA_HOME/jre/lib/amd64/libdecora_sse.so \ $JAVA_HOME/jre/lib/amd64/libprism_*.so \ $JAVA_HOME/jre/lib/amd64/libfxplugins.so \ $JAVA_HOME/jre/lib/amd64/libglass.so \ $JAVA_HOME/jre/lib/amd64/libgstreamer-lite.so \ $JAVA_HOME/jre/lib/amd64/libjavafx*.so \ $JAVA_HOME/jre/lib/amd64/libjfx*.so \ && rm -rf /usr/share/locale/* \ && yum remove -y perl \ && yum clean all ENV PATH $PATH:$JAVA_HOME/bin VOLUME ["/data/"] On Fri, Sep 11, 2015 at 9:58 PM, Nitin Lamba <[email protected]> wrote: > Glad it helped! > > > If you combine the two remaining RUNs into one and do similar optimization > in the .sh file, you may reduce it even further! ;) > > > Best, > > Nitin > > ________________________________ > From: jun aoki <[email protected]> > Sent: Friday, September 11, 2015 6:53 PM > To: Nitin Lamba > Cc: Dan Smith; geode > Subject: Re: Review Request 35541: GEODE-60 Geode build environment within > Docker to enable anybody and on any OS and any environment can build Geode > as long as there is Docker > > This is cool Nitin, I could indeed reduce the image size. > will reattach the patch. Thank you for leting me know! > > Previous > REPOSITORY TAG IMAGE ID > CREATED VIRTUAL SIZE > geode/build-jaoki latest c8ca6d841cbb 24 > hours ago 977.3 MB > geode/build latest c60ec778317d 24 > hours ago 977 MB > > > After chaining > REPOSITORY TAG IMAGE ID > CREATED VIRTUAL SIZE > geode/build-jaoki latest ec41cb387c7b 15 > seconds ago 839.3 MB > geode/build latest 1e870e6486bf 16 > seconds ago 839 MB > > > On Fri, Sep 11, 2015 at 5:30 PM, Nitin Lamba <[email protected]<mailto: > [email protected]>> wrote: > Hi Jun, > > You may also want to consider RUN command chaining within Dockerfile (like > William did in docker/Dockerfile). It creates relatively smaller images: > https://labs.ctl.io/optimizing-docker-images/ > > My $0.02, > Nitin > > ________________________________________ > From: jun aoki <[email protected]<mailto: > [email protected]>> on behalf of jun aoki <[email protected] > <mailto:[email protected]>> > Sent: Friday, September 11, 2015 3:46 PM > To: geode; Dan Smith; jun aoki > Subject: Re: Review Request 35541: GEODE-60 Geode build environment within > Docker to enable anybody and on any OS and any environment can build Geode > as long as there is Docker > > > On Sept. 11, 2015, 6:43 p.m., Dan Smith wrote: > > > Looks good! One very minor comment - we might want to put this is a > directory with a different name than "build" The gradle output directories > are called build, so for example our .gitignore file will exclude > everything in there. Maybe dev-tools/docker? Otherwise, ship it! > > thank you for letting me know, Dan. will change it > > > - jun > > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/35541/#review98660 > ----------------------------------------------------------- > > > On Sept. 11, 2015, 6:38 p.m., jun aoki wrote: > > > > ----------------------------------------------------------- > > This is an automatically generated e-mail. To reply, visit: > > https://reviews.apache.org/r/35541/ > > ----------------------------------------------------------- > > > > (Updated Sept. 11, 2015, 6:38 p.m.) > > > > > > Review request for geode. > > > > > > Bugs: GEODE-60 > > https://issues.apache.org/jira/browse/GEODE-60 > > > > > > Repository: geode > > > > > > Description > > ------- > > > > Added Dockerfile for docker to build a container which lets users to > build Geode. > > > > > > Diffs > > ----- > > > > README.md 8ac89a0 > > dev-tools/build/Dockerfile PRE-CREATION > > dev-tools/build/start-docker.sh PRE-CREATION > > > > Diff: https://reviews.apache.org/r/35541/diff/ > > > > > > Testing > > ------- > > > > Tested locally. > > > > > > Thanks, > > > > jun aoki > > > > > > > > -- > -jun > -- William Markito Oliveira Enterprise Architect -- For questions about Apache Geode, please write to *[email protected] <[email protected]>*
