fixing docker file and adding knative deployment yaml
This commit is contained in:
parent
bb8e09c5e2
commit
5c033cbbdc
@ -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
13
service.yaml
Normal 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"
|
Loading…
Reference in New Issue
Block a user