I have an existing Docker image for OpenScoring based on Debian 8 that
I'd like to switch over to using CentOS 7 as the main userspace in the
container.

That Dockerfile just gets maven and the JDK from the base image, then
uses mvn to install everything else:

=================
FROM maven:3.3-jdk-8

MAINTAINER Villu Ruusmann <[email protected]>

COPY . /openscoring

WORKDIR /openscoring

# Downloads the org.openscoring:openscoring-server JAR file and all
its transitive dependency JAR files to "/openscoring/lib"
RUN ["mvn", "clean", "package"]

ENTRYPOINT ["java", "-Dconfig.file=application.conf",
"-Djava.util.logging.config.file=logging.properties", "-cp", "lib/*",
"org.openscoring.server.Main"]

EXPOSE 8080

CMD []
=================

Searching for "centos maven docker" wasn't finding me anything useful,
but searching for "openshift sti maven" brought me to
https://docs.openshift.org/latest/using_images/s2i_images/java.html

That linked to https://github.com/fabric8io/java-main/tree/master/ and
following the "FROM" list from there got me to
https://github.com/fabric8io/base-sti/blob/master/Dockerfile

That gives me *a* maven, but it doesn't give me the latest upstream
maven, and it bakes in a bunch of JBoss specific assumptions (like
changing the user to "jboss").

That assumption of "Java-means-JBoss" then holds all the way to the
base image that builds directly atop CentOS:
https://github.com/jboss-dockerfiles/base/blob/master/Dockerfile

Do we have a recommended base image for non-JBoss Java applications,
or should I be working out how to build my own from the raw CentOS 7
base?

Regards,
Nick.

-- 
Nick Coghlan   |   [email protected]   |   Brisbane, Australia

_______________________________________________
Container-tools mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/container-tools

Reply via email to