imagej2
imagej2 copied to clipboard
Add Dockerfile for ImageJ.app
Intent of this dockerfile is to build ImageJ locally without downloading any pre-built versions (zips or update sites). This strategy can be repeated in down- stream repositories either by following a similar strategy or by using this built image as a parent.
Status (post-#hackdd17)
bin/populate-app.sh looks to currently not configure a Java runtime:
--build-arg IMAGE=openjdk:8
No GUI detected. Falling back to headless mode.
No GUI detected. Falling back to headless mode.
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=128m; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release
log4j:WARN No appenders could be found for logger (org.bushe.swing.event.EventService).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Dec 15, 2017 5:57:30 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
--build-arg IMAGE=openjdk:9
No GUI detected. Falling back to headless mode.
No GUI detected. Falling back to headless mode.
Could not load Java library '/usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/libjvm.so': /usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/libjvm.so: cannot open shared object file: No such file or directory
Warning: falling back to System JVM
Unrecognized option: -Xincgc
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
--build-arg IMAGE=openjdk:9 (with new launcher)
See http://forum.imagej.net/t/please-test-the-new-imagej-launcher/8238/18
This is injected to the dockerfile just before ENTRYPOINT:
## TEMPORARY
ENV LAUNCHER_URL "https://maven.imagej.net/service/local/artifact/maven/redirect?r=snapshots&g=net.imagej&a=imagej-launcher&v=5.0.0-SNAPSHOT&e=exe&c=linux64"
RUN curl -L "$LAUNCHER_URL" > /ImageJ.app/ImageJ-linux64
RUN chmod a+x /ImageJ.app/ImageJ-linux64
Results:
No GUI detected. Falling back to headless mode.
No GUI detected. Falling back to headless mode.
Could not load Java library '/usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/libjvm.so': /usr/lib/jvm/java-9-openjdk-amd64/lib/amd64/server/libjvm.so: cannot open shared object file: No such file or directory
Warning: falling back to System JVM
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.imagej.patcher.LegacyInjector (file:/ImageJ.app/jars/ij1-patcher-0.12.6.jar) to method java.lang.ClassLoader.findLoadedClass(java.lang.String)
WARNING: Please consider reporting this to the maintainers of net.imagej.patcher.LegacyInjector
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
log4j:WARN No appenders could be found for logger (org.bushe.swing.event.EventService).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Dec 15, 2017 6:02:44 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
but --build-arg IMAGE=centos:7
No GUI detected. Falling back to headless mode.
No GUI detected. Falling back to headless mode.
Warning: falling back to system Java
Could not launch system-wide Java (No such file or directory)
@joshmoore Sorry for ignoring this for so long. Is this still useful to you if we merge? And/or would it make sense to create an imagej/dockerfiles repository and put this there?
Sorry for ignoring this for so long. Is this still useful to you if we merge?
No worries. I have several tabs open to come back and look into xvfb integration. And which point, this might again be useful.
And/or would it make sense to create an imagej/dockerfiles repository and put this there?
This is really the core question, and I'm unsure. The tradeoffs are:
- This is a developer-focused docker file, doesn't require any callback/webhook to trigger a rebuild, and might be generally useful.
- Having dockers in a separate repo requires something to periodically bump them, but are certainly nice and tidy.
If there's no desire to have a Dockerfile in the main repo, that's fine with me. I can also concentrate on https://github.com/fiji/dockerfiles.