Build and Test with Docker
Philipp Kunz
philipp.kunz at paratix.ch
Sat Mar 21 19:37:29 UTC 2020
Hi everyone,
When I started contributing I went through all the building and testing
instructions [1] and after I had bought a new computer recently, it
occurred to me that this could as well be simplified with docker.
What I found was not a lot, surprisingly. A simple test called
DockerBasicTest inside the Open Jdk that does nothing with building or
testing the jdk but only runs the built jdk image as I understood after
a quick glance. To mention is also AdoptOpenJDK [2] which says it does
not work at the moment, which I haven't even tried myself so far. I
haven't found anything related in the mailing list archives nor in the
bugs.
What I searched and if that really does not yet exist I want to propose
is kind of an additional section to the building and testing
instructions at [1] that basically says which docker image to use as an
alternative to prepare a computer accordingly. The usage should be as
simple as possible: 1. checkout jdk, 2. docker build ..., 3. docker run
.... Unlike [2] I would suggest multi-arch images [3].
Again, did I just not find the relevant thing? If so, I will be
grateful for a hint where to look, apologize for this spam, and vote
for anything to make also others find it easier.
In my opinion, the Open Jdk itself would be the right place to maintain
a few dockerfiles so that these can be changed and maintained together
with the Open Jdk as it evolves along with its build and testing
instructions.
It would probably require quite limited effort only, basically
extracting the build and testing instructions into a few architecture
depending scripts and reference them from one or a few new dockerfiles.
This might also help to save a lot of time to existing contributors and
help others to start contributing with a lower threshold to get
started.
Does that sound reasonable? Any opinions?
Regards,
Philipp
[1] https://hg.openjdk.java.net/jdk/jdk/file/12eb1e2087d2/doc
[2] https://github.com/AdoptOpenJDK/openjdk-build/tree/master/docker
[3] https://docs.docker.com/registry/spec/manifest-v2-2/
More information about the build-dev
mailing list