-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #559 from hobbit-project/feature/build-in-docker
Build all components in Docker
- Loading branch information
Showing
5 changed files
with
41 additions
and
32 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
FROM eclipse-temurin:11-focal | ||
FROM maven:3-eclipse-temurin-11 AS build | ||
WORKDIR /usr/src/hobbit-platform | ||
COPY parent-pom/pom.xml parent-pom/ | ||
RUN mvn --file parent-pom -Dmaven.test.skip=true install | ||
ARG project=analysis-component | ||
COPY ${project}/pom.xml ${project}/ | ||
RUN mvn --file ${project} dependency:go-offline | ||
COPY ${project}/src ${project}/src | ||
RUN mvn --file ${project} -Dmaven.test.skip=true package | ||
|
||
COPY target/analysis-component.jar . | ||
|
||
CMD java -cp analysis-component.jar org.hobbit.core.run.ComponentStarter org.hobbit.analysis.AnalysisComponent | ||
FROM eclipse-temurin:11 | ||
COPY --from=build /usr/src/hobbit-platform/analysis-component/target/analysis-component.jar . | ||
CMD ["java", "-cp", "analysis-component.jar", "org.hobbit.core.run.ComponentStarter", "org.hobbit.analysis.AnalysisComponent"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,18 @@ | ||
FROM eclipse-temurin:11-focal | ||
FROM maven:3-eclipse-temurin-11 AS build | ||
WORKDIR /usr/src/hobbit-platform | ||
COPY parent-pom/pom.xml parent-pom/ | ||
RUN mvn --file parent-pom -Dmaven.test.skip=true install | ||
ARG project=platform-controller | ||
COPY ${project}/pom.xml ${project}/ | ||
RUN mvn --file ${project} dependency:go-offline | ||
COPY ${project}/src ${project}/src | ||
RUN mvn --file ${project} -Dmaven.test.skip=true package | ||
|
||
FROM eclipse-temurin:11 | ||
|
||
# Create an empty metadata directory (it will be used as default by the file-based image manager) | ||
RUN mkdir -p /usr/src/app/metadata | ||
|
||
COPY target/platform-controller.jar platform-controller.jar | ||
COPY --from=build /usr/src/hobbit-platform/platform-controller/target/platform-controller.jar . | ||
|
||
CMD ["java", "-cp", "platform-controller.jar", "org.hobbit.core.run.ComponentStarter", "org.hobbit.controller.PlatformController"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
FROM eclipse-temurin:11-focal | ||
|
||
COPY target/storage-service.jar storage-service.jar | ||
FROM maven:3-eclipse-temurin-11 AS build | ||
WORKDIR /usr/src/hobbit-platform | ||
COPY parent-pom/pom.xml parent-pom/ | ||
RUN mvn --file parent-pom -Dmaven.test.skip=true install | ||
ARG project=platform-storage/storage-service | ||
COPY ${project}/pom.xml ${project}/ | ||
RUN mvn --file ${project} dependency:go-offline | ||
COPY ${project}/src ${project}/src | ||
RUN mvn --file ${project} -Dmaven.test.skip=true package | ||
|
||
FROM eclipse-temurin:11 | ||
COPY --from=build /usr/src/hobbit-platform/platform-storage/storage-service/target/storage-service.jar . | ||
CMD ["java", "-cp", "storage-service.jar", "org.hobbit.core.run.ComponentStarter", "org.hobbit.storage.service.StorageService"] |