mirror of
https://github.com/jpetazzo/container.training.git
synced 2026-02-14 17:49:59 +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.
29 lines
681 B
YAML
29 lines
681 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: build-image
|
|
spec:
|
|
restartPolicy: OnFailure
|
|
containers:
|
|
- name: docker-build
|
|
image: docker
|
|
env:
|
|
- name: REGISTRY_PORT
|
|
value: #"30000"
|
|
command: ["sh", "-c"]
|
|
args:
|
|
- |
|
|
apk add --no-cache git &&
|
|
mkdir /workspace &&
|
|
git clone https://github.com/jpetazzo/container.training /workspace &&
|
|
docker build -t localhost:$REGISTRY_PORT/worker /workspace/dockercoins/worker &&
|
|
docker push localhost:$REGISTRY_PORT/worker
|
|
volumeMounts:
|
|
- name: docker-socket
|
|
mountPath: /var/run/docker.sock
|
|
volumes:
|
|
- name: docker-socket
|
|
hostPath:
|
|
path: /var/run/docker.sock
|
|
|