If we want to to build OCI container images with docker
and e.g. want to the following pod setup:
apiVersion: v1
kind: Pod
metadata:
name: dind
spec:
containers:
- name: build
image: docker:23.0.1-cli
command:
- cat
tty: true
resources:
requests:
cpu: 10m
memory: 256Mi
env:
- name: DOCKER_HOST
value: tcp://localhost:2375
- name: dind-daemon
image: docker:23.0.1-dind-rootless
securityContext:
privileged: true
resources:
requests:
cpu: 20m
memory: 512Mi
volumeMounts:
- name: docker-graph-storage
mountPath: /var/lib/docker
volumes:
- name: docker-graph-storage
emptyDir: {}
I am wondering what the replacement is for
securityContext:
privileged: true
since that is deprecated in kubernetes >1.25
because: https://kubernetes.io/blog/2021/04/06/podsecuritypolicy-deprecation-past-present-and-future/
and if its still possible to do the same as above and how?