Skip to content

Commit

Permalink
Update example to use Java 11
Browse files Browse the repository at this point in the history
  • Loading branch information
chanseokoh committed Feb 25, 2019
1 parent e033076 commit a61bc58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/java/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ load("@io_bazel_rules_docker//java:image.bzl", "java_image")
java_image(
name = "hello",
srcs = ["HelloJava.java"],
base = "//java:java8",
base = "//java:java11",
main_class = "examples.HelloJava",
)

Expand Down
4 changes: 2 additions & 2 deletions examples/java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
FROM openjdk:8-jdk-slim AS build-env
FROM openjdk:11-jdk-slim AS build-env
ADD . /app/examples
WORKDIR /app
RUN javac examples/*.java
RUN jar cfe main.jar examples.HelloJava examples/*.class

FROM gcr.io/distroless/java
FROM gcr.io/distroless/java:11
COPY --from=build-env /app /app
WORKDIR /app
CMD ["main.jar"]

0 comments on commit a61bc58

Please sign in to comment.