mirror of
http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore.git
synced 2026-01-15 05:35:09 +08:00
build(devcontainer): 添加 Hyperf 开发套件核心配置文件
- 新增 devcontainer.json 配置文件,用于 Hyperf 框架的开发环境 - 配置了基础设置、挂载点、容器生命周期管理等 - 集成了多个 Visual Studio Code 扩展,提升开发效率
This commit is contained in:
49
.devcontainer/devcontainer.json
Normal file
49
.devcontainer/devcontainer.json
Normal file
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"name": "Hyperf Development Kit Core Dev Container",
|
||||
"image": "harbor.luxcreo.cn/library/hyperf:8.1-swoole",
|
||||
// 基础配置
|
||||
"workspaceFolder": "/srv/www", // 对应 --workdir
|
||||
"workspaceMount": "source=${localWorkspaceFolder},target=/srv/www,type=bind", // 主工作区挂载
|
||||
// 附加挂载
|
||||
"mounts": [
|
||||
"source=${env:HOME}/.ssh,target=/root/.ssh,type=bind", // SSH 密钥挂载
|
||||
"source=${env:HOME}/.gitconfig,target=/root/.gitconfig,type=bind" // SSH 密钥挂载
|
||||
],
|
||||
// 容器生命周期
|
||||
"shutdownAction": "stopContainer", // 类似 --rm 的清理行为
|
||||
"updateRemoteUserUID": true, // 确保用户 ID 同步
|
||||
// 保留的必要 runArgs
|
||||
"runArgs": [
|
||||
"--pull=always", // 强制拉取最新镜像
|
||||
"--name=hdk-core" // 容器命名(需保持唯一性)
|
||||
],
|
||||
// 初始化命令
|
||||
"postCreateCommand": "echo 'Container initialized!'",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": [
|
||||
"rid9.datetime",
|
||||
"MS-CEINTL.vscode-language-pack-zh-hans",
|
||||
"ms-azuretools.vscode-docker",
|
||||
"janisdd.vscode-edit-csv",
|
||||
"onecentlin.laravel-blade",
|
||||
"DavidWang.ini-for-vscode",
|
||||
"bmewburn.vscode-intelephense-client",
|
||||
"mechatroner.rainbow-csv",
|
||||
"Alibaba-Cloud.tongyi-lingma",
|
||||
"atommaterial.a-file-icon-vscode",
|
||||
"ParthR2031.colorful-comments",
|
||||
"vincaslt.highlight-matching-tag",
|
||||
"xabikos.JavaScriptSnippets",
|
||||
"shufo.vscode-blade-formatter",
|
||||
"dansysanalyst.pest-snippets",
|
||||
"m1guelpf.better-pest",
|
||||
"xoronic.pestfile",
|
||||
"xdebug.php-debug",
|
||||
"golang.go",
|
||||
"cweijan.vscode-typora",
|
||||
"ciceroisback.loam"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user