Skip to content
Open
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
6 changes: 5 additions & 1 deletion template/java8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ WORKDIR /home/app

COPY . /home/app/

RUN gradle build
# The distribution created by `gradle build` is modifying the jars, excluding all resources.
# For that reason it is removed and created with `gradle distZip`
RUN gradle build \
&& rm /home/app/entrypoint/build/distributions/entrypoint* \
&& gradle distZip

FROM openjdk:8u121-jdk-alpine as ship
RUN apk --no-cache add curl \
Expand Down
11 changes: 11 additions & 0 deletions template/java8/entrypoint/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ plugins {
// Apply the application plugin to add support for building an application
id 'application'

// Apply the distribution plugin to add resources to entrypoint dist
id 'distribution'

}

// Define the main class for the application
Expand All @@ -29,6 +32,14 @@ dependencies {
compile project(':function')
}

sourceSets {
main {
resources {
srcDirs "src/main/resources"
}
}
}

jar {
manifest {
attributes 'Implementation-Title': 'OpenFaaS Function',
Expand Down