Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created August 15, 2019 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save recursivecodes/ec2de166416c32c5b536f6331b684b4c to your computer and use it in GitHub Desktop.
Save recursivecodes/ec2de166416c32c5b536f6331b684b4c to your computer and use it in GitHub Desktop.
Dockerfile
FROM fnproject/fn-java-fdk-build:jdk11-1.0.98 as build-stage
WORKDIR /function
ENV MAVEN_OPTS -Dhttp.proxyHost= -Dhttp.proxyPort= -Dhttps.proxyHost= -Dhttps.proxyPort= -Dhttp.nonProxyHosts= -Dmaven.repo.local=/usr/share/maven/ref/repository
ADD pom.xml /function/pom.xml
RUN ["mvn", "package", "dependency:copy-dependencies", "-DincludeScope=runtime", "-DskipTests=true", "-Dmdep.prependGroupId=true", "-DoutputDirectory=target", "--fail-never"]
ADD src /function/src
RUN ["mvn", "package", "-DskipTests=true"]
FROM fnproject/fn-java-fdk:jre11-1.0.98
WORKDIR /function
COPY --from=build-stage /function/target/*.jar /function/app/
CMD ["codes.recursive.KmsDemoFunction::handleRequest"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment