generated from oracle-devrel/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3436c44
commit 25cf735
Showing
3 changed files
with
58 additions
and
14 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
21 changes: 21 additions & 0 deletions
21
.../functions/java-helloworld-AI-with-local-dev-and-oci-functions/files/Dockerfile.local_oci
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM fnproject/fn-java-fdk-build:jdk17-1.0-latest 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"] | ||
FROM fnproject/fn-java-fdk:jre17-1.0.187 | ||
WORKDIR /function | ||
COPY --from=build-stage /function/target/*.jar /function/app/ | ||
RUN echo "**** WARNING ***" | ||
RUN echo "**** THIS CONTAINER CONTAINS OCI CREDENTIALS - DO NOT DISTRIBUTE ***" | ||
RUN echo "Copy your OCI CLI .oci dir under this dir before running this Dockerfile " | ||
RUN echo "OCI API KEYFILE is expected to be without any path in the config e.g. key_file = oci_api_key.pem" | ||
ADD .oci/config / | ||
ADD .oci/oci_api_key.pem / | ||
RUN chmod 777 /config | ||
RUN chmod 777 /oci_api_key.pem | ||
RUN sed -i '/^key_file/d' /config | ||
RUN echo "key_file = /oci_api_key.pem" >> /config | ||
CMD ["com.example.HelloAIFunction::handleRequest"] |
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