define war container as initContainer

This commit is contained in:
Benjamin Krein 2018-09-06 15:57:37 -04:00 committed by Benjamin Krein
parent 04efb0640f
commit e39212705f
1 changed files with 6 additions and 8 deletions

View File

@ -3,19 +3,17 @@ kind: Pod
metadata:
name: javaweb-2
spec:
containers:
initContainers:
- image: resouer/sample:v2
name: war
lifecycle:
postStart:
exec:
command:
- "cp"
- "/sample.war"
- "/app"
command:
- "cp"
- "/sample.war"
- "/app"
volumeMounts:
- mountPath: /app
name: app-volume
containers:
- image: resouer/mytomcat:7.0
name: tomcat
command: ["sh","-c","/root/apache-tomcat-7.0.42-v2/bin/start.sh"]