dsh-plugin-container 0.4.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/README.zh-CN.md +5 -3
- package/lib/client.js +1043 -682
- package/package.json +3 -2
- package/src/client/build-image.jsx +158 -55
- package/src/client/components.jsx +5 -0
- package/src/client/i18n.js +100 -22
- package/src/client/icons.jsx +12 -14
- package/src/client/index.jsx +15 -1
- package/src/client/page.jsx +73 -1
- package/src/client/platforms.js +2 -0
- package/src/client/push-image.jsx +113 -0
- package/src/client/styles.js +12 -1
- package/src/client/tabs/images.jsx +26 -20
- package/src/host/apple.js +13 -13
- package/src/host/images.js +140 -0
- package/src/host/service.js +26 -15
package/README.md
CHANGED
|
@@ -11,6 +11,9 @@ A DSH sidebar panel for managing containers on macOS: Docker (colima / Docker De
|
|
|
11
11
|
- Two providers, Docker and Apple container, with runtime status and context switching
|
|
12
12
|
- Containers, images, volumes, networks, Compose, and commands
|
|
13
13
|
- Start / stop / restart / delete containers; pull / push / build / inspect / delete images
|
|
14
|
+
- **Pull** with an optional architecture (`linux/amd64` / `linux/arm64`); a pasted `docker pull nginx` works too
|
|
15
|
+
- **Build** an image from a project folder chosen with a folder picker: the form checks the folder, finds Dockerfiles, suggests a tag, and previews the command
|
|
16
|
+
- **Push** an image: pick a target such as `username/app:tag` or `ghcr.io/username/app:tag`; it is tagged first when the name differs, with login hints and a clear message when the registry rejects the push
|
|
14
17
|
- Logs, inspect, and live follow
|
|
15
18
|
- **Attach**: `docker attach` for Docker; `container exec` for Apple
|
|
16
19
|
- **Exec**: open a shell inside a container (`docker exec -it <id> /bin/sh`)
|
|
@@ -52,8 +55,6 @@ Do not enable source-path mode and npm-package mode at the same time.
|
|
|
52
55
|
- Logs / Follow / Inspect
|
|
53
56
|
- Attach: take over the container's main process
|
|
54
57
|
- Exec: open a new shell inside the container
|
|
55
|
-
- Build: build an image from an absolute context path and optional Dockerfile
|
|
56
|
-
- Push: push an image to its registry
|
|
57
58
|
- Ask AI / Diagnose: starts a separate DSH session that calls the read-only container tools
|
|
58
59
|
4. The Images tab shows architecture and can start a container directly from an image
|
|
59
60
|
|
|
@@ -89,7 +90,7 @@ npm publish --access public --provenance
|
|
|
89
90
|
```bash
|
|
90
91
|
npm install
|
|
91
92
|
npm run build # src/client -> lib/client.js
|
|
92
|
-
npm test #
|
|
93
|
+
npm test # 53 tests
|
|
93
94
|
npm pack # pre-release check
|
|
94
95
|
```
|
|
95
96
|
|
|
@@ -101,6 +102,7 @@ Layout:
|
|
|
101
102
|
index.js Host entry
|
|
102
103
|
cordis.patch.yml Bundle install patch
|
|
103
104
|
src/host/service.js Provider routing + Docker
|
|
105
|
+
src/host/images.js Image push/build validation
|
|
104
106
|
src/host/apple.js Apple container
|
|
105
107
|
src/host/attach.js Attach/Exec PTY
|
|
106
108
|
src/host/tools.js Read-only agent tools
|
package/README.zh-CN.md
CHANGED
|
@@ -11,6 +11,9 @@ DSH 左栏容器面板:管理 macOS 上的 Docker(colima / Docker Desktop /
|
|
|
11
11
|
- Docker / Apple container 双 provider,运行时状态、上下文切换
|
|
12
12
|
- 容器、镜像、卷、网络、Compose、命令
|
|
13
13
|
- 容器启动/停止/重启/删除,镜像 pull/push/build/inspect/delete
|
|
14
|
+
- **拉取镜像**:可选指定架构(`linux/amd64` / `linux/arm64`),也可以直接粘贴 `docker pull nginx` 整条命令
|
|
15
|
+
- **构建镜像**:用文件夹选择器选择项目目录,表单会实时检查目录、识别 Dockerfile、推荐镜像名,并预览将执行的命令
|
|
16
|
+
- **推送镜像**:选择目标名,如 `用户名/app:tag` 或 `ghcr.io/用户名/app:tag`;名字不同时会先打标签,带登录提示,被仓库拒绝时给出明确说明
|
|
14
17
|
- 查看日志、inspect、实时 follow
|
|
15
18
|
- **Attach**:Docker `docker attach`;Apple `container exec`
|
|
16
19
|
- **Exec**:进入容器内部 shell(`docker exec -it <id> /bin/sh`)
|
|
@@ -52,8 +55,6 @@ node scripts/install-profile.mjs --home "$HOME/.dsh" --profile desktop
|
|
|
52
55
|
- 日志 / Follow / Inspect
|
|
53
56
|
- Attach:接管容器主进程
|
|
54
57
|
- Exec:在容器内开一个新 shell
|
|
55
|
-
- Build:用绝对路径构建上下文和可选 Dockerfile 构建镜像
|
|
56
|
-
- Push:把镜像推送到 registry
|
|
57
58
|
- 问 AI / 诊断:新建独立 DSH 会话,调用只读容器工具
|
|
58
59
|
4. 镜像 tab 可查看架构,或直接用镜像启动容器
|
|
59
60
|
|
|
@@ -89,7 +90,7 @@ npm publish --access public --provenance
|
|
|
89
90
|
```bash
|
|
90
91
|
npm install
|
|
91
92
|
npm run build # src/client -> lib/client.js
|
|
92
|
-
npm test #
|
|
93
|
+
npm test # 53 tests
|
|
93
94
|
npm pack # 发布前检查
|
|
94
95
|
```
|
|
95
96
|
|
|
@@ -101,6 +102,7 @@ npm pack # 发布前检查
|
|
|
101
102
|
index.js Host 入口
|
|
102
103
|
cordis.patch.yml bundle 安装 patch
|
|
103
104
|
src/host/service.js provider 路由 + Docker
|
|
105
|
+
src/host/images.js 镜像 push/build 校验
|
|
104
106
|
src/host/apple.js Apple container
|
|
105
107
|
src/host/attach.js Attach/Exec PTY
|
|
106
108
|
src/host/tools.js 只读 Agent Tools
|