File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- FROM openjdk:8-alpine
1+ FROM openjdk:8-jre
22
3- COPY target/client-java-examples-0.2 -SNAPSHOT-jar-with-dependencies.jar /examples.jar
3+ COPY target/client-java-examples-3.0.0-beta2 -SNAPSHOT-jar-with-dependencies.jar /examples.jar
44
55CMD ["java" , "-jar" , "/examples.jar" ]
66
Original file line number Diff line number Diff line change 1+ # creates a pod and runs Example.java(list pods for all namespaces) on starting of pod
2+ export REPO_ROOT=$( pwd) /../
3+
4+ cd ${REPO_ROOT} /kubernetes
5+ mvn install
6+
7+ cd ${REPO_ROOT} /examples
8+ mvn package
9+ eval $( minikube docker-env)
10+ docker build -t test/examples:1.0 .
11+ kubectl apply -f test.yaml
Original file line number Diff line number Diff line change 1+ apiVersion : v1
2+ kind : ReplicationController
3+ metadata :
4+ name : test
5+ spec :
6+ replicas : 1
7+ template :
8+ metadata :
9+ labels :
10+ app : test
11+ spec :
12+ containers :
13+ - name : test
14+ image : test/examples:1.0
15+ command : ["/bin/sh","-c"]
16+ args : ["java -jar /examples.jar","while :; do sleep 1; done"]
You can’t perform that action at this time.
0 commit comments