udpate docker volumn manager (#6690)

This commit is contained in:
Archer
2026-04-01 10:15:03 +08:00
committed by GitHub
parent d5ea3179a0
commit e77145f9e6
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -10,6 +10,7 @@ VM_RUNTIME=docker
# Docker socket 路径(仅 docker 模式)
VM_DOCKER_SOCKET=/var/run/docker.sock
VM_DOCKER_API_VERSION=1.44
# k8s 命名空间(仅 kubernetes 模式)
VM_K8S_NAMESPACE=opensandbox
@@ -14,7 +14,7 @@ export class DockerVolumeDriver implements IVolumeDriver {
private dockerFetch(path: string, init?: RequestInit): Promise<Response> {
// Bun supports unix socket via the `unix` fetch option
return fetch(`http://localhost/v1.41${path}`, {
return fetch(`http://localhost${env.VM_DOCKER_API_VERSION}${path}`, {
...init,
// @ts-ignore - Bun-specific option
unix: this.socketPath
+1
View File
@@ -5,6 +5,7 @@ const schema = z.object({
VM_AUTH_TOKEN: z.string().min(1),
VM_RUNTIME: z.enum(['docker', 'kubernetes']).default('kubernetes'),
VM_DOCKER_SOCKET: z.string().default('/var/run/docker.sock'),
VM_DOCKER_API_VERSION: z.string().default('1.44'),
VM_K8S_NAMESPACE: z.string().default('opensandbox'),
VM_K8S_PVC_STORAGE_CLASS: z.string().default('standard'),
VM_K8S_PVC_STORAGE_SIZE: z.string().default('1Gi'),