mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 17:49:59 +00:00
22 lines
427 B
YAML
22 lines
427 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: nginx-with-git
|
|
spec:
|
|
volumes:
|
|
- name: www
|
|
containers:
|
|
- name: nginx
|
|
image: nginx
|
|
volumeMounts:
|
|
- name: www
|
|
mountPath: /usr/share/nginx/html/
|
|
- name: git
|
|
image: alpine
|
|
command: [ "sh", "-c", "apk add git && git clone https://github.com/octocat/Spoon-Knife /www" ]
|
|
volumeMounts:
|
|
- name: www
|
|
mountPath: /www/
|
|
restartPolicy: OnFailure
|
|
|