Files
2026-05-23 20:59:01 +08:00

48 lines
1.6 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
"name": "Luckfox Pico",
"build": {
"dockerfile": "Dockerfile", // Dockerfile 的文件名
"context": "..", // 构建上下文(推荐使用项目根目录)
"args": { // 可选:传递构建参数
"NODE_VERSION": "20"
}
},
"features": {
"ghcr.io/danzilberdan/devcontainers/opencode:0": {}
},
"mounts": [
// 挂载本机全局配置(推荐只挂载 config 目录)
{
"source": "${localEnv:HOME}/.config/opencode",
"target": "/root/.config/opencode",
"type": "bind"
},
// 挂载认证凭证(最安全的做法)
{
"source": "${localEnv:HOME}/.local/share/opencode/auth.json",
"target": "/root/.local/share/opencode/auth.json",
"type": "bind"
},
// 挂载 SSH 密钥
{
"source": "${localEnv:HOME}/.ssh",
"target": "/root/.ssh",
"type": "bind"
}
],
"customizations": {
"vscode": {
"extensions": [
"opencode.opencode-vscode",
"codeinchinese.englishchinesedictionary",
"ms-vscode.cpptools-extension-pack",
"ms-vscode.cmake-tools",
"ms-azuretools.vscode-containers",
"cschlosser.doxdocgen",
"oderwat.indent-rainbow"
]
}
},
"remoteUser": "root"
}