[
https://issues.apache.org/jira/browse/GEODE-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14734296#comment-14734296
]
William Markito Oliveira commented on GEODE-60:
-----------------------------------------------
We may be discussing a couple different things here...
1) The size of the openjdk8 docker image in my machine is about 800MB, which is
exactly the reason I did the Java install as part of the Geode Dockerfile.
2) If we reuse that part and use it as a base for our image, it end up with
350MB. Just Centos + JDK - unnecessary stuff. No Geode.
3) In my understanding, if you are going to automate the build process with
Docker and in order to not rely on the hosting system at all even volumes may
not be good, hence I was thinking we would also clone and build Geode source
inside Docker. But I'm not a build expert and using volumes would work as well
or I may be wrong... Don't know.
4) In any case, there is a Docker image that will be available to Geode users
that will of course have Geode on it. That's what the Dockerfile in the docker
folder of Geode produces. Which then adds the remaining bytes to the final
size of 490MB. We could do much better if the final version was just using
JRE and maybe a smaller OS than Centos.
Size is important in order to allow people that will pass around and distribute
the docker images or build applications with multiple containers that may also
need to download those images on different hosts. This problem may not apply
here to our build process.
The other reason for creating our own base image is that, as [~jaoki] pointed,
Oracle is still not really into Docker and their images may change or be
removed and that would break our build. So I'd vote for creating our own.
Sizing on my box:
{code}
$ docker images
REPOSITORY TAG IMAGE ID
CREATED VIRTUAL SIZE
apachegeode/java8 latest a3d0b683f1b2 30
minutes ago 351.9 MB
apachegeode/geode unstable 1707dbeb47a9 6 days
ago 490.6 MB
java openjdk-7u79-jdk ade42d38879d 2
weeks ago 587.4 MB
java openjdk-8u66-jdk 2f5a61e35ea4 2
weeks ago 817.5 MB
{code}
The Dockerfile with Java 8 and without cloning and building Geode would look
like this:
{code}
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/"]
{code}
> Geode build environment within Docker to enable anybody and on any OS and any
> environment can build Geode as long as there is Docker
> ------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GEODE-60
> URL: https://issues.apache.org/jira/browse/GEODE-60
> Project: Geode
> Issue Type: Sub-task
> Components: build
> Reporter: jun aoki
> Assignee: jun aoki
> Attachments: GEODE-60.patch
>
>
> geode build is on gradle and seems very tidy but it still requires third
> party libraries, like Java.
> Let's have a Docker environment so that at least we have an reliable
> immutable environment and we can use it on CI on builds.apache.org
> https://builds.apache.org/view/E-G/view/Geode/
> (From my experience, It is a bit of pain to find a right environment on
> builds.a.o but Docker is a cure so far.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)