Skip to content

Instantly share code, notes, and snippets.

@rafaribe
Created June 27, 2024 10:56
Show Gist options
  • Save rafaribe/20a7afa08eb25b090963ee028fdf5271 to your computer and use it in GitHub Desktop.
Save rafaribe/20a7afa08eb25b090963ee028fdf5271 to your computer and use it in GitHub Desktop.
Debug dind-dockerfile
apiVersion: v1
kind: Pod
metadata:
name: debug-pod
namespace: default
spec:
containers:
- command: ["tail", "-f", "/dev/null"]
env:
- name: DOCKER_HOST
value: unix:///var/run/docker.sock
image: rafaribe/k8s-debug-pod:latest
imagePullPolicy: Always
name: debug-pod
resources:
limits:
cpu: "3"
memory: 3Gi
requests:
cpu: "2"
memory: 2Gi
volumeMounts:
- mountPath: /var/run
name: dind-sock
- args:
- dockerd
- --host=unix:///var/run/docker.sock
- --group=$(DOCKER_GROUP_GID)
env:
- name: DOCKER_GROUP_GID
value: "123"
image: docker:dind
imagePullPolicy: IfNotPresent
name: dind
resources: {}
securityContext:
privileged: true
volumeMounts:
- mountPath: /var/run
name: dind-sock
volumes:
- emptyDir: {}
name: dind-sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment