fixing docker file and adding knative deployment yaml

This commit is contained in:
marius 2020-04-18 21:03:03 +02:00
parent bb8e09c5e2
commit 5c033cbbdc
2 changed files with 14 additions and 1 deletions

View File

@ -14,7 +14,7 @@ RUN mvn package -DskipTests
# It's important to use OpenJDK 8u191 or above that has container support enabled.
# https://hub.docker.com/r/adoptopenjdk/openjdk8
# https://docs.docker.com/develop/develop-images/multistage-build/#use-multi-stage-builds
FROM adoptopenjdk/jdk-11.0.6_10-alpine-slim
FROM adoptopenjdk/openjdk11:jdk-11.0.6_10-alpine-slim
# Copy the jar to the production image from the builder stage.
COPY --from=builder /app/target/chuckjokes-*.jar /chuckjokes.jar

13
service.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
name: chuckjokes-java-spring
namespace: default
spec:
template:
spec:
containers:
- image: docker.io/wishi/chuckjokes
env:
- name: TARGET
value: "Spring Boot Blog Knative v1"