fiji / dockerfiles

Fiji Dockerfiles for Docker builds.
https://registry.hub.docker.com/u/fiji/fiji/
8 stars 9 forks source link

Update bootstrap.sh URLs, docker image bases, and add RPi Docker file #8

Closed chigozienri closed 5 years ago

ctrueden commented 5 years ago

Nice! Thank you very much, @chigozienri!

chigozienri commented 5 years ago

@ctrueden Do you know how to get this to propagate through to docker hub?

ctrueden commented 5 years ago

@chigozienri I'm sorry, I don't.

@hinerm Are you watching GitHub these days? Any quick guidance?

joshmoore commented 5 years ago

@ctrueden : if I recall correctly from Dresden 2017, I don't remember our tracking down info about either of the orgs:

Which also reminds me of whether or not it's worth dredging https://github.com/imagej/imagej/pull/182 back up. @chigozienri happy to hear your thoughts there, if you have any.

ctrueden commented 5 years ago

@joshmoore Maybe it would make sense to create a repository at imagej/dockerfiles? I just don't have time right now to work on the Docker side of things, sorry. But if you—or anyone in the community who is interested—wants to step up as maintainer of Docker configuration for ImageJ and/or Fiji, that would be wonderful. I reached out to @hinerm just now asking him to add me as admin to those orgs, so that we can move forward.

joshmoore commented 5 years ago

@ctrueden : imagej/dockerfiles probably only makes since if fiji/dockerfiles is being deprecated. The imagej/imagej dockerfile is for devs and won't be as useful if it's elsewhere. (But also ok if it's nowhere.) And in general, happy to get my hands dirty to keep these working.

ctrueden commented 5 years ago

@joshmoore Thanks to Mark, I am now an owner of the imagej and fiji orgs on Docker Hub. I added you as an owner as well. I agree that getting imagej/imagej#182 fully operational would be great. But partly that depends on getting the ImageJ Launcher fixes fully released and integrated into the ImageJ POM, no? As well as completing scijava/scijava-maven-plugin#17, right?

Edit: Hmm, it seems the bin/populate-app.sh script uses the maven-assembly-plugin to build the app. IIRC, this is what we use to build the standalone ImageJ2 zips. A strategy like that won't, I don't think, work for building Fiji bundles. There is also the new-style -Pdist that uses the javafx-maven-plugin to create a standalone application using the JavaFX native launcher. All of these things work differently from one another, and we should spend some time considering the best way forward for automating application packaging, and then use the chosen solution across the board. Things are too heterogeneous right now.

joshmoore commented 5 years ago

@chigozienri : based on the above, I'm in the process of testing out your changes here (and hopefully getting them into travis). Note, however, that your arm Dockerfile is currently failing with:

 ---> Running in 4ad71ffeb711
standard_init_linux.go:207: exec user process caused "exec format error"
The command '/bin/sh -c apt-get -y update && apt-get -y install software-properties-common && echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && add-apt-repository -y ppa:webupd8team/java && apt-get -y update && apt-get -y install oracle-java8-installer && rm -rf /var/lib/apt/lists/* && rm -rf /var/cache/oracle-jdk8-installer' returned a non-zero code: 1

But partly that depends ...

@ctrueden : once I finish testing this PR and getting it on Docker Hub, I'll have to go back to the state of 182. IIRC most things worked and I was mostly using it to evaluate work someone (likely you) were doing around Java 8. i.e. I don't know if there is an immediate blocker.

A strategy like that won't, I don't think, work for building Fiji bundles

Understood, and happy to be told "This" is the way to do it, but for the moment, I think there's room for having separate strategies in the imagej/imagej dev docker versus the fiji/dockerfiles ones. i.e. I don't intend to transfer any style changes to fiji/dockerfiles until there's a clear need/desire. The biggest issue I see so far in trying to build them all is that JDK6 might fall by the wayside at least initially.

@dscho : 👋 🕺 🍺 Hope all is well.

chigozienri commented 5 years ago

@joshmoore I just ran it fresh on a raspberry pi as follows

git clone https://github.com/chigozienri/dockerfiles
cd dockerfiles/fiji-oracle-jdk8-arm32v7
sudo docker build .

and got no error. Full output here: https://pastebin.com/JJawtsDa The line you got the error at is line 15.

The "exec format error" was exactly the error that I was trying to solve: I was getting it on the raspberry pi when I tried to use the fiji-openjdk-8 Dockerfile. Note that the arm Dockerfile I wrote uses FROM arm32v7/ubuntu as the base Dockerfile, which will only work on an arm device, and I think will produce the error you saw if you try to run any Bash commands in it on the wrong architecture.

joshmoore commented 5 years ago

Gotcha. Hmmm.... so that'll either leave it irregularly tested or perhaps something like:

can be put in place...