Select Git revision
-
Sonia Zorba authoredSonia Zorba authored
Dockerfile 984 B
FROM git.ia2.inaf.it:5050/ia2/ia2-devops/maven_npm
ADD vospace-ui-frontend/package.json /vospace-ui-frontend/
WORKDIR /vospace-ui-frontend
RUN npm install
ADD vospace-ui-backend/pom.xml /vospace-ui-backend/
WORKDIR /vospace-ui-backend
RUN mvn initialize
ADD vospace-ui-frontend/src /vospace-ui-frontend/src/
ADD vospace-ui-frontend/public /vospace-ui-frontend/public/
ADD vospace-ui-frontend/*.js /vospace-ui-frontend/
ADD vospace-ui-frontend/*.json /vospace-ui-frontend/
ADD vospace-ui-frontend/.env.production /vospace-ui-frontend/
WORKDIR /vospace-ui-frontend
RUN npm run build
ADD vospace-ui-backend/src /vospace-ui-backend/src/
ADD vospace-ui-backend/pom.xml /vospace-ui-backend/
WORKDIR /vospace-ui-backend
RUN mvn clean package -DskipTests -Pinclude-gui
FROM openjdk:14-jdk-alpine
RUN apk add socat
COPY --from=0 /vospace-ui-backend/target/vospace-ui.jar /vospace-ui.jar
ADD docker-entrypoint.sh /
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]