[
https://issues.apache.org/jira/browse/GEODE-60?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14747049#comment-14747049
]
jun aoki commented on GEODE-60:
-------------------------------
Hi [~markito], After having tried out your dockerfile, I'd like to suggest this
way.
{code}
├── incubator-geode
│ └── docker
│ ├── base
│ │ └─── Dockerfile <-- (1)
│ ├── runtime
│ │ ├─── Dockerfile <-- (2)
│ │ └─── build-runtime-docker.sh <-- (3)
│ └── compile
│ ├─── Dockerfile <-- (4)
│ └─── start-compile-docker.sh <-- (5)
{code}
(1) This defines OS version like "from centos:centos7" and a specific java
version etc, and remove all unnecessary libs
Pretty much looks like [~markito]'s Dockerfile explained
[here|https://issues.apache.org/jira/browse/GEODE-60?focusedCommentId=14734296&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14734296],
which does not include cloning git part and gradlew build part
(2) the actual cloning git and gradlew build are happening here. but it uses a
base image of (1) so this becomes very lightweight.
This will build a image which is for end-users who want to play geode.
(3) small script to build the runtime image
{code}
docker build -t geode-base/v1 $path
docker build -t geode-runtime/v1 $path
{code}
(4) This is to build a image specific to gradlew build/compile/test. It will
NOT contain geode itself at all.(but mounted by volume param )
(5) This should look like [a piece of code in my
branch|https://github.com/jaoki/incubator-geode/blob/dockerized-build/dev-tools/docker/start-docker.sh]
After executing (3) and (5) you'd get a result of docker image like this
{code}
> docker images
jaoki@junubuntu:~/coding$ docker images
REPOSITORY TAG IMAGE ID CREATED
VIRTUAL SIZE
geode-base/v1 latest 50d4c1dafb6a 3 months ago
732.2 MB
geode-runtime/v1 latest 50d4c1dafb6a 3 months ago
732.2 MB
geode-compile/v1 latest 50d4c1dafb6a 3 months ago
732.2 MB
{code}
*Pros*
The definition of OS version, Java version etc can be only once place in
geode-base/v1 image.
This is a good practice Docker community uses.
*Cons*
Maybe the geode-runtime/v1 will be bigger than what it is, since it builds
twice.?
Let me know what you guys think.
> 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-2.patch, GEODE-60-3.patch, GEODE-60-4.patch,
> 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)