Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore "resources" layer #939

Merged
merged 1 commit into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ public void apply(Project project) {
layer.getLayerKind().set(LayerKind.APP);
layer.getFiles().from(runnerJar);
});
image.addLayer(layer -> {
layer.getLayerKind().set(LayerKind.EXPANDED_RESOURCES);
layer.getFiles().from(project.getExtensions().getByType(SourceSetContainer.class)
.getByName(SourceSet.MAIN_SOURCE_SET_NAME).getOutput().getResourcesDir());
});
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public enum LayerKind {
PROJECT_LIBS("project_libs", "libs"),
SNAPSHOT_LIBS("snapshot_libs", "libs"),
LIBS("libs", "libs"),
APP("app", "");
APP("app", ""),
EXPANDED_RESOURCES("resources", "resources");

private final String sourceDirName;
private final String targetDirName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ class Application {
WORKDIR /home/alternate
COPY --link layers/libs /home/alternate/libs
COPY --link layers/app /home/alternate/
COPY --link layers/resources /home/alternate/resources
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/home/alternate/application.jar"]
"""
Expand Down Expand Up @@ -252,6 +253,7 @@ class Application {
WORKDIR /home/app
COPY layers/libs /home/app/libs
COPY layers/app /home/app/
COPY layers/resources /home/app/resources
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/home/app/application.jar"]
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,7 @@ FROM ghcr.io/graalvm/native-image-community:17-ol${DefaultVersions.ORACLELINUX}
WORKDIR /home/alternate
COPY --link layers/libs /home/alternate/libs
COPY --link layers/app /home/alternate/
COPY --link layers/resources /home/alternate/resources
RUN mkdir /home/alternate/config-dirs
RUN mkdir -p /home/alternate/config-dirs/generateResourcesConfigFile
RUN mkdir -p /home/alternate/config-dirs/io.netty/netty-common/4.0.0.Final
Expand Down Expand Up @@ -692,6 +693,7 @@ WORKDIR /home/app
COPY --link layers/libs /home/app/libs
COPY --link server.iprof /home/app/server.iprof
COPY --link layers/app /home/app/
COPY --link layers/resources /home/app/resources
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/home/app/application.jar"]
"""
Expand All @@ -706,6 +708,7 @@ WORKDIR /home/app
COPY --link layers/libs /home/app/libs
COPY --link server.iprof /home/app/server.iprof
COPY --link layers/app /home/app/
COPY --link layers/resources /home/app/resources
RUN mkdir /home/app/config-dirs
RUN mkdir -p /home/app/config-dirs/generateResourcesConfigFile
COPY --link config-dirs/generateResourcesConfigFile /home/app/config-dirs/generateResourcesConfigFile
Expand Down Expand Up @@ -768,6 +771,7 @@ WORKDIR /home/app
COPY --link layers/libs /home/app/libs
COPY --link server.iprof /home/app/server.iprof
COPY --link layers/app /home/app/
COPY --link layers/resources /home/app/resources
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/home/app/application.jar"]
"""
Expand Down
Loading