Skip to content

Commit 51c8df0

Browse files
k8s: drop host Docker socket mount from instant-api (P1-W5-14)
The instant-api Deployment mounted the node's /run/docker.sock as a hostPath volume and set DOCKER_HOST. Write access to the host Docker socket is equivalent to root on the node — a container-escape primitive on the public, internet-facing api service. Prod builds run via kaniko-in-k8s (verified: instant-config COMPUTE_PROVIDER=k8s), so the Docker socket is unused. Remove: - the docker-sock hostPath volume - its volumeMount on the api container - the DOCKER_HOST env var Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 8343d62 commit 51c8df0

1 file changed

Lines changed: 0 additions & 10 deletions

File tree

k8s/app.yaml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,15 @@ spec:
5151
until pg_isready -h postgres-platform -U instant -d instant_platform; do
5252
echo "Waiting for platform DB..."; sleep 2
5353
done
54-
volumes:
55-
- name: docker-sock
56-
hostPath:
57-
path: /run/docker.sock # Lima VM's actual dockerd socket (not the macOS-forwarded one)
58-
type: Socket
5954
containers:
6055
- name: api
6156
image: instant-api:local # built with: docker build -t instant-api:local .
6257
ports:
6358
- containerPort: 8080
64-
volumeMounts:
65-
- name: docker-sock
66-
mountPath: /var/run/docker.sock
6759
envFrom:
6860
- configMapRef:
6961
name: instant-config
7062
env:
71-
- name: DOCKER_HOST
72-
value: unix:///var/run/docker.sock
7363
- name: DATABASE_URL
7464
valueFrom:
7565
secretKeyRef:

0 commit comments

Comments
 (0)