mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-28 09:11:18 +00:00
28 lines
480 B
YAML
28 lines
480 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: nginx-with-git
|
|
spec:
|
|
terminationGracePeriodSeconds: 0
|
|
containers:
|
|
- name: nginx
|
|
image: nginx
|
|
volumeMounts:
|
|
- name: www
|
|
mountPath: /usr/share/nginx/html/
|
|
- name: git
|
|
image: alpine
|
|
command:
|
|
- /bin/sh
|
|
- -c
|
|
- |
|
|
apk add git &&
|
|
git clone https://github.com/octocat/Spoon-Knife /www
|
|
volumeMounts:
|
|
- name: www
|
|
mountPath: /www/
|
|
volumes:
|
|
- name: www
|
|
emptyDir: {}
|
|
|