mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-07-27 00:31:12 +00:00
- volumes (general overview) - building with the docker engine (bind-mounting the docker socket) - building with kaniko (and init containers) - managing configuration (configmaps, downward api) Also added a new-content.yml file with just the new content (for easier review), containing my plans for future chapters.
22 lines
441 B
YAML
22 lines
441 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: nginx-with-volume
|
|
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 --no-cache git && git clone https://github.com/octocat/Spoon-Knife /www" ]
|
|
volumeMounts:
|
|
- name: www
|
|
mountPath: /www/
|
|
restartPolicy: OnFailure
|
|
|