Created
June 29, 2017 09:09
-
-
Save joshmoore/59b79da799d4ec2811393adbdbc967cb to your computer and use it in GitHub Desktop.
IDR Java Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM java:8-jdk | |
ENV OMERO_URL https://downloads.openmicroscopy.org/omero/5.3.2/artifacts/OMERO.java-5.3.2-ice36-b62.zip | |
RUN curl -A Docker "$OMERO_URL" > /tmp/omero.zip \ | |
&& unzip -qd /opt /tmp/omero.zip \ | |
&& ln -s /opt/OMERO.java* /opt/omero \ | |
&& test -e /opt/omero \ | |
&& rm /tmp/omero.zip | |
RUN useradd -m -s /bin/bash omero | |
USER omero | |
WORKDIR /home/omero | |
ENV ICE_CONFIG /home/omero/ice.config | |
COPY ice.config $ICE_CONFIG | |
COPY Main.java /home/omero/Main.java | |
RUN javac -cp "/opt/omero/libs/*" Main.java | |
ENTRYPOINT ["java", "-cp", ".:/opt/omero/libs/*", "Main"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
omero.host=cytohack.openmicroscopy.org | |
omero.user=public | |
omero.pass=public |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String args[]) throws Exception { | |
omero.client client = new omero.client(); | |
client.createSession(); | |
try { | |
// pass | |
} finally { | |
System.out.println("Closing " + client.getSession()); | |
client.closeSession(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment