I have the following multi-stage dockerfile that attempts to copy each module of my multi-module java maven project and build my ear file using mvn clean install. dockerfile: # Copy files from local to maven image and build ear FROM maven:3.5-jdk-8 AS build COPY module1 /usr/src/app/src COPY module2 /usr/src/app/src COPY module3 /usr/src/app/src COPY pom.xml /usr/src/app ..
I have a Maven Java Application that I am trying to dockerize. I have the following dockerfile so far that I have got from this answer. # # Build stage # FROM maven:3.6.0-jdk-11-slim AS build COPY src /home/app/src COPY pom.xml /home/app RUN mvn -f /home/app/pom.xml clean install # Expose the ports we’re interested in EXPOSE ..
I have a Java project that builds a jar file that is then ran on a Jboss EAP server. The jar file is built using the maven command: mvn clean install Currently I am building the jar manually using maven then adding it to my dockerfile as follows: # rest of dockerfile… EXPOSE 8080 9990 ..
I have the following Dockerfile for a very simple spring boot REST application: # Prepare runtime. FROM openjdk:8-jre-alpine AS runtime WORKDIR /app EXPOSE 80 # Prepare build workspace. FROM gradle:5.3.0-jdk-alpine AS sdk WORKDIR /build-workspace # Setup build workspace. USER root RUN chown -R gradle . USER gradle # Copy. COPY build.gradle . COPY gradle.properties . ..