@exagone313/dsh-podman 1.2.1 → 1.4.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/dist/card-route.d.ts +8 -0
- package/dist/card-route.js +19 -8
- package/dist/client/ContainerCard.js +147 -110
- package/dist/client/card-protocol.d.ts +4 -0
- package/dist/client/card-protocol.js +34 -0
- package/dist/client/container-card-caches.d.ts +1 -1
- package/dist/client/container-card-caches.js +19 -17
- package/dist/client/container-card-config.d.ts +47 -0
- package/dist/client/container-card-config.js +160 -0
- package/dist/client/container-card-controller.d.ts +35 -3
- package/dist/client/container-card-controller.js +263 -41
- package/dist/client/container-card-create-modal.d.ts +5 -1
- package/dist/client/container-card-create-modal.js +111 -94
- package/dist/client/container-card-defaults.d.ts +16 -0
- package/dist/client/container-card-defaults.js +147 -0
- package/dist/client/container-card-dialog-styles.d.ts +7 -0
- package/dist/client/container-card-dialog-styles.js +70 -0
- package/dist/client/container-card-dialog.d.ts +12 -0
- package/dist/client/container-card-dialog.js +47 -0
- package/dist/client/container-card-directory-styles.d.ts +1 -1
- package/dist/client/container-card-directory-styles.js +5 -5
- package/dist/client/container-card-directory.js +8 -7
- package/dist/client/container-card-edit-modal.d.ts +39 -0
- package/dist/client/container-card-edit-modal.js +29 -0
- package/dist/client/container-card-editors.d.ts +5 -2
- package/dist/client/container-card-editors.js +109 -134
- package/dist/client/container-card-field-styles.d.ts +7 -0
- package/dist/client/container-card-field-styles.js +63 -0
- package/dist/client/container-card-form.d.ts +47 -0
- package/dist/client/container-card-form.js +61 -0
- package/dist/client/container-card-group.d.ts +9 -0
- package/dist/client/container-card-group.js +22 -0
- package/dist/client/container-card-images.d.ts +6 -2
- package/dist/client/container-card-images.js +63 -23
- package/dist/client/container-card-paths.js +43 -52
- package/dist/client/container-card-ports.d.ts +3 -4
- package/dist/client/container-card-ports.js +74 -38
- package/dist/client/container-card-resources.d.ts +38 -0
- package/dist/client/container-card-resources.js +73 -0
- package/dist/client/container-card-row.d.ts +11 -19
- package/dist/client/container-card-row.js +122 -122
- package/dist/client/container-card-secrets.d.ts +31 -3
- package/dist/client/container-card-secrets.js +174 -56
- package/dist/client/container-card-shared.d.ts +173 -6
- package/dist/client/container-card-shared.js +616 -57
- package/dist/client/container-card-status.d.ts +18 -0
- package/dist/client/container-card-status.js +166 -0
- package/dist/client/container-card-styles.d.ts +49 -7
- package/dist/client/container-card-styles.js +396 -40
- package/dist/client/container-card-table-styles.d.ts +15 -0
- package/dist/client/container-card-table-styles.js +237 -0
- package/dist/client/container-card-tabs-styles.d.ts +5 -0
- package/dist/client/container-card-tabs-styles.js +46 -0
- package/dist/client/container-card-toast.d.ts +5 -0
- package/dist/client/container-card-toast.js +10 -0
- package/dist/client/container-card-volumes.d.ts +1 -0
- package/dist/client/container-card-volumes.js +14 -19
- package/dist/client/container-card-workspace.d.ts +8 -12
- package/dist/client/container-card-workspace.js +76 -14
- package/dist/client/index.js +6491 -3474
- package/dist/client/locales.d.ts +10 -1
- package/dist/client/locales.js +270 -114
- package/dist/client/relative-time.d.ts +10 -0
- package/dist/client/relative-time.js +74 -0
- package/dist/client/slot-contract.d.ts +8 -0
- package/dist/client/tool-views.js +2 -1
- package/dist/container-env.js +1 -1
- package/dist/env-rows.d.ts +9 -11
- package/dist/env-rows.js +72 -40
- package/dist/generated/version.d.ts +2 -2
- package/dist/generated/version.js +2 -2
- package/dist/guest-terminal.js +1 -1
- package/dist/mount-enums.d.ts +11 -0
- package/dist/mount-enums.js +60 -0
- package/dist/subprocess.js +1 -1
- package/dist/terminal-sessions.js +2 -2
- package/dist/terminal-shells.js +1 -1
- package/dist/tool-handlers.js +1 -1
- package/dist/workspace-binding.js +2 -2
- package/docs/architecture.md +4 -4
- package/docs/architecture.zh.md +1 -1
- package/docs/configuration.md +26 -25
- package/docs/configuration.zh.md +13 -11
- package/docs/development-prompt.md +7 -7
- package/docs/development-prompt.zh.md +7 -7
- package/docs/development.md +20 -16
- package/docs/development.zh.md +17 -16
- package/docs/install-dsh-and-dsh-podman.md +13 -12
- package/docs/install-dsh-and-dsh-podman.zh.md +13 -9
- package/docs/usage.md +189 -39
- package/docs/usage.zh.md +148 -29
- package/package.json +35 -31
- package/dist/client/container-card-default-env.d.ts +0 -10
- package/dist/client/container-card-default-env.js +0 -69
|
@@ -31,10 +31,10 @@ what is missing or different, keeping whatever is already configured. Use the
|
|
|
31
31
|
container tools; never run `make` or edit files on the host.
|
|
32
32
|
|
|
33
33
|
1. Image: build a custom image named `dsh-podman-tooling` from the `archlinux`
|
|
34
|
-
base with packages `go`, `nodejs
|
|
35
|
-
`python-chardet
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
base with packages `go`, `nodejs`, `npm`, `reuse` and
|
|
35
|
+
`python-chardet`. It is a local image, not a published one; leave an existing
|
|
36
|
+
one alone when it already carries exactly these packages, and rebuild it from
|
|
37
|
+
this list when it does not.
|
|
38
38
|
2. Volume: create the workspace volume `dsh-podman-toolchain` unless it already
|
|
39
39
|
exists.
|
|
40
40
|
3. Container: inspect the default container's image, mounts, PATH additions and
|
|
@@ -50,13 +50,13 @@ container tools; never run `make` or edit files on the host.
|
|
|
50
50
|
`GOMODCACHE=/opt/toolchain/gomodcache`, `GOPATH=/opt/toolchain/gopath`,
|
|
51
51
|
`npm_config_cache=/opt/toolchain/npm-cache`,
|
|
52
52
|
`npm_config_prefix=/opt/toolchain/npm-global`,
|
|
53
|
-
`PNPM_HOME=/opt/toolchain/pnpm-home
|
|
54
|
-
`DENO_DIR=/opt/toolchain/deno-dir` and
|
|
53
|
+
`PNPM_HOME=/opt/toolchain/pnpm-home` and
|
|
55
54
|
`GOENV=/opt/toolchain/home/.config/go/env`, merged with the variables
|
|
56
55
|
already on the container.
|
|
57
56
|
4. pnpm: the volume, not the image, carries pnpm. If `pnpm --version` does not
|
|
58
57
|
report the version `package.json` pins in `packageManager`, install it with
|
|
59
|
-
`npm install -g pnpm@<that version>` and check again.
|
|
58
|
+
`npm install -g pnpm@<that version>` and check again. dprint, the formatter,
|
|
59
|
+
is a project devDependency and arrives with `pnpm install`.
|
|
60
60
|
5. Git identity: do not write a `~/.gitconfig`. If no Git identity is
|
|
61
61
|
configured, tell me to set it once on the Podman page (sidebar **Plugins**
|
|
62
62
|
panel → **Installed** → **dsh-podman**): **Default
|
package/docs/development.md
CHANGED
|
@@ -22,8 +22,8 @@ This page is for **contributors** building the plugin from this repository.
|
|
|
22
22
|
|
|
23
23
|
## Building
|
|
24
24
|
|
|
25
|
-
Prerequisites: Go 1.27, Node ≥ 22, pnpm 12,
|
|
26
|
-
|
|
25
|
+
Prerequisites: Go 1.27, Node ≥ 22, pnpm 12, and (for the browser half) the
|
|
26
|
+
`@deepseek-ai/dsh-client-*` packages published on npm.
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
29
|
pnpm install
|
|
@@ -39,9 +39,11 @@ The `Makefile` wraps the common workflows:
|
|
|
39
39
|
make build-go # build the Go binaries into bin/<os>-<arch>/
|
|
40
40
|
make build # build-go + pnpm-build
|
|
41
41
|
make vet # gofmt -s check + go vet with the build tags
|
|
42
|
+
make lint # vet + oxlint over the TypeScript sources
|
|
43
|
+
make lint-ts # oxlint only
|
|
42
44
|
make test-go # go test with the build tags
|
|
43
45
|
make test # test-go + pnpm test (JS tests, which run against dist/)
|
|
44
|
-
make fmt # gofmt -s +
|
|
46
|
+
make fmt # gofmt -s + dprint (TypeScript and Markdown)
|
|
45
47
|
make fmt-check # verify the formatting without rewriting anything
|
|
46
48
|
make proto # regenerate the protobuf Go bindings with buf
|
|
47
49
|
make proto-check # buf lint + buf breaking + check the committed bindings are current
|
|
@@ -171,7 +173,7 @@ containers yourself:
|
|
|
171
173
|
image**;
|
|
172
174
|
- with `container_recreate`, for a named container or the default one.
|
|
173
175
|
|
|
174
|
-
To rebuild a whole workspace instead, use **Remove
|
|
176
|
+
To rebuild a whole workspace instead, use **Remove containers** on its row (or
|
|
175
177
|
`RemoveWorkspace`): the pod and all its containers are removed, and the next
|
|
176
178
|
attach creates the pod and its default container again. Restarting the two
|
|
177
179
|
services never touches workspace containers, and neither action removes volumes,
|
|
@@ -189,24 +191,26 @@ A workspace container's root filesystem is read-only and disposable, so the
|
|
|
189
191
|
toolchain a contributor builds with needs a workspace volume. No development
|
|
190
192
|
image is distributed: build a custom one — the
|
|
191
193
|
[setup prompt](development-prompt.md) builds `dsh-podman-tooling` from the
|
|
192
|
-
`archlinux` base with `go`, `nodejs
|
|
194
|
+
`archlinux` base with `go`, `nodejs` (Node 26), `npm`, `reuse` and
|
|
193
195
|
`python-chardet` — and create a workspace volume for the state an image cannot
|
|
194
196
|
keep: the Go and npm caches, `gopath` with the `go install`ed tools, and pnpm,
|
|
195
|
-
which `package.json` pins to a version the Arch repositories do not carry
|
|
197
|
+
which `package.json` pins to a version the Arch repositories do not carry
|
|
198
|
+
(dprint ships with the project's `pnpm install`).
|
|
196
199
|
|
|
197
200
|
The prompt mounts that volume as `dsh-podman-toolchain` at `/opt/toolchain`
|
|
198
201
|
(read-write) and points the container's caches at it, so commands work without
|
|
199
202
|
sourcing anything:
|
|
200
203
|
|
|
201
|
-
| Container setting | Value
|
|
202
|
-
| ----------------- |
|
|
203
|
-
| PATH additions | `/opt/toolchain/gopath/bin`, `/opt/toolchain/npm-global/bin`, `/opt/toolchain/pnpm-home`
|
|
204
|
-
| Environment | `GOCACHE=/opt/toolchain/gocache`, `GOMODCACHE=/opt/toolchain/gomodcache`, `GOPATH=/opt/toolchain/gopath`, `npm_config_cache=/opt/toolchain/npm-cache`, `npm_config_prefix=/opt/toolchain/npm-global`, `PNPM_HOME=/opt/toolchain/pnpm-home`, `
|
|
204
|
+
| Container setting | Value |
|
|
205
|
+
| ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
206
|
+
| PATH additions | `/opt/toolchain/gopath/bin`, `/opt/toolchain/npm-global/bin`, `/opt/toolchain/pnpm-home` |
|
|
207
|
+
| Environment | `GOCACHE=/opt/toolchain/gocache`, `GOMODCACHE=/opt/toolchain/gomodcache`, `GOPATH=/opt/toolchain/gopath`, `npm_config_cache=/opt/toolchain/npm-cache`, `npm_config_prefix=/opt/toolchain/npm-global`, `PNPM_HOME=/opt/toolchain/pnpm-home`, `GOENV=/opt/toolchain/home/.config/go/env` |
|
|
205
208
|
|
|
206
209
|
Set the commit identity once on the Podman page (sidebar **Plugins** panel →
|
|
207
210
|
**Installed** → **dsh-podman**) under
|
|
208
|
-
[Default environment](configuration.md#default-environment)
|
|
209
|
-
so containers get `GIT_AUTHOR_*`/`GIT_COMMITTER_*` without a
|
|
211
|
+
[Default environment variables](configuration.md#default-environment-variables)
|
|
212
|
+
→ **Git identity**, so containers get `GIT_AUTHOR_*`/`GIT_COMMITTER_*` without a
|
|
213
|
+
`~/.gitconfig`.
|
|
210
214
|
|
|
211
215
|
The prompt applies all of this from inside dsh and can be pasted again to repair
|
|
212
216
|
a workspace. Podman stores managed volumes with `DSH_PODMAN_VOLUME_PREFIX`
|
|
@@ -251,16 +255,16 @@ image) exactly, upgrading or downgrading the profile's copy to match.
|
|
|
251
255
|
|
|
252
256
|
CI runs on every **branch** push and pull request, split across
|
|
253
257
|
`.github/workflows/ci-common.yml` (REUSE lint and zizmor), `ci-code.yml` (Go,
|
|
254
|
-
JS, images, Trivy), `ci-docs.yml` (
|
|
258
|
+
JS, images, Trivy), `ci-docs.yml` (dprint) and `ci-dsh-image.yml`. A **tag**
|
|
255
259
|
push runs only `release.yml`, which repeats the build, vet and tests itself:
|
|
256
260
|
|
|
257
261
|
- **actions-lint** — zizmor scans the workflows for insecure practices.
|
|
258
262
|
- **reuse** — REUSE license compliance.
|
|
259
263
|
- **go** — build, `gofmt -s` check, vet, tests, and govulncheck (Go
|
|
260
264
|
vulnerabilities). Unfixed findings don't fail the job; fixable ones do.
|
|
261
|
-
- **js** — TypeScript formatting check,
|
|
262
|
-
`pnpm audit`.
|
|
263
|
-
- **docs** — Markdown formatting check (`
|
|
265
|
+
- **js** — install, TypeScript formatting check, lint, typecheck, build, tests,
|
|
266
|
+
and `pnpm audit`.
|
|
267
|
+
- **docs** — Markdown formatting check (`dprint` via `make fmt-check-md`).
|
|
264
268
|
- **images** — builds the orchestrator and guest-agent images (runs only after
|
|
265
269
|
the test jobs pass); **dsh image** builds `Containerfile.dsh`.
|
|
266
270
|
- **trivy** — filesystem vulnerability scan (unfixed ignored) and container
|
package/docs/development.zh.md
CHANGED
|
@@ -21,8 +21,7 @@ SPDX-License-Identifier: MIT
|
|
|
21
21
|
|
|
22
22
|
## 构建
|
|
23
23
|
|
|
24
|
-
前置要求:Go 1.27、Node ≥ 22、pnpm 12
|
|
25
|
-
2.9(用于格式化),以及(浏览器端所需的)发布在 npm 上的
|
|
24
|
+
前置要求:Go 1.27、Node ≥ 22、pnpm 12,以及(浏览器端所需的)发布在 npm 上的
|
|
26
25
|
`@deepseek-ai/dsh-client-*` 包。
|
|
27
26
|
|
|
28
27
|
```sh
|
|
@@ -39,9 +38,11 @@ Go 构建标签会跳过 btrfs 和 devicemapper 存储驱动,它们需要宿
|
|
|
39
38
|
make build-go # build the Go binaries into bin/<os>-<arch>/
|
|
40
39
|
make build # build-go + pnpm-build
|
|
41
40
|
make vet # gofmt -s check + go vet with the build tags
|
|
41
|
+
make lint # vet + oxlint over the TypeScript sources
|
|
42
|
+
make lint-ts # oxlint only
|
|
42
43
|
make test-go # go test with the build tags
|
|
43
44
|
make test # test-go + pnpm test (JS tests, which run against dist/)
|
|
44
|
-
make fmt # gofmt -s +
|
|
45
|
+
make fmt # gofmt -s + dprint (TypeScript and Markdown)
|
|
45
46
|
make fmt-check # verify the formatting without rewriting anything
|
|
46
47
|
make proto # regenerate the protobuf Go bindings with buf
|
|
47
48
|
make proto-check # buf lint + buf breaking + check the committed bindings are current
|
|
@@ -162,7 +163,7 @@ guest agent 之后,请自行重建容器:
|
|
|
162
163
|
image**;
|
|
163
164
|
- 或使用 `container_recreate`,作用于命名容器或默认容器。
|
|
164
165
|
|
|
165
|
-
若要重建整个工作区,可在其行上使用
|
|
166
|
+
若要重建整个工作区,可在其行上使用 **移除容器**(或 `RemoveWorkspace`):pod
|
|
166
167
|
及其所有容器都会被移除,下次接入时会重新创建 pod
|
|
167
168
|
与默认容器。重启这两个服务绝不会触及工作区容器,上述两种操作也都不会删除卷、机密或项目数据。
|
|
168
169
|
|
|
@@ -174,20 +175,19 @@ guest agent 之后,请自行重建容器:
|
|
|
174
175
|
### 开发容器工具链
|
|
175
176
|
|
|
176
177
|
工作区容器的根文件系统是只读且一次性的,因此贡献者构建所用的工具链需要工作区的一个卷。项目并不分发开发镜像:请自行构建一个自定义镜像——[设置提示词](development-prompt.zh.md)
|
|
177
|
-
会以 `archlinux` 为父镜像构建 `dsh-podman-tooling`,包含
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
pnpm。
|
|
178
|
+
会以 `archlinux` 为父镜像构建 `dsh-podman-tooling`,包含 `go`、`nodejs`(Node
|
|
179
|
+
26)、`npm`、`reuse` 和 `python-chardet`——并为镜像无法保存的状态创建工作区卷:Go
|
|
180
|
+
与 npm 缓存、含 `go install` 工具的 `gopath`, 以及 `package.json`
|
|
181
|
+
固定版本、Arch 仓库没有的 pnpm(dprint 随项目的 `pnpm install` 一并安装)。
|
|
182
182
|
|
|
183
183
|
提示词会把该卷以 `dsh-podman-toolchain` 挂载到
|
|
184
184
|
`/opt/toolchain`(读写),并让容器的缓存都指向它,因此无需 source
|
|
185
185
|
任何脚本即可使用:
|
|
186
186
|
|
|
187
|
-
| 容器设置 | 值
|
|
188
|
-
| ----------- |
|
|
189
|
-
| PATH 追加项 | `/opt/toolchain/gopath/bin`、`/opt/toolchain/npm-global/bin`、`/opt/toolchain/pnpm-home`
|
|
190
|
-
| 环境变量 | `GOCACHE=/opt/toolchain/gocache`、`GOMODCACHE=/opt/toolchain/gomodcache`、`GOPATH=/opt/toolchain/gopath`、`npm_config_cache=/opt/toolchain/npm-cache`、`npm_config_prefix=/opt/toolchain/npm-global`、`PNPM_HOME=/opt/toolchain/pnpm-home`、`
|
|
187
|
+
| 容器设置 | 值 |
|
|
188
|
+
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
189
|
+
| PATH 追加项 | `/opt/toolchain/gopath/bin`、`/opt/toolchain/npm-global/bin`、`/opt/toolchain/pnpm-home` |
|
|
190
|
+
| 环境变量 | `GOCACHE=/opt/toolchain/gocache`、`GOMODCACHE=/opt/toolchain/gomodcache`、`GOPATH=/opt/toolchain/gopath`、`npm_config_cache=/opt/toolchain/npm-cache`、`npm_config_prefix=/opt/toolchain/npm-global`、`PNPM_HOME=/opt/toolchain/pnpm-home`、`GOENV=/opt/toolchain/home/.config/go/env` |
|
|
191
191
|
|
|
192
192
|
在 Podman 页面(侧边栏 **插件** 面板 → **已安装** →
|
|
193
193
|
**dsh-podman**)的[默认环境变量](configuration.zh.md#默认环境变量) → **Git
|
|
@@ -234,7 +234,7 @@ Environment=DSH_PODMAN_PLUGIN_SOURCE=/mnt/dsh-podman.tgz
|
|
|
234
234
|
|
|
235
235
|
CI 在每次**分支**推送和拉取请求时运行,分散在
|
|
236
236
|
`.github/workflows/ci-common.yml`(REUSE lint 与
|
|
237
|
-
zizmor)、`ci-code.yml`(Go、JS、镜像、Trivy)、`ci-docs.yml`(
|
|
237
|
+
zizmor)、`ci-code.yml`(Go、JS、镜像、Trivy)、`ci-docs.yml`(dprint)和
|
|
238
238
|
`ci-dsh-image.yml` 中。推送**标签**时只运行 `release.yml`,它自身会重复构建、vet
|
|
239
239
|
和测试:
|
|
240
240
|
|
|
@@ -242,8 +242,9 @@ zizmor)、`ci-code.yml`(Go、JS、镜像、Trivy)、`ci-docs.yml`(Deno f
|
|
|
242
242
|
- **reuse** — REUSE 许可证合规检查。
|
|
243
243
|
- **go** — 构建、`gofmt -s` 检查、vet、测试和 govulncheck(Go 漏洞)。未修复的
|
|
244
244
|
发现不会导致任务失败;可修复的会导致失败。
|
|
245
|
-
- **js** — TypeScript
|
|
246
|
-
|
|
245
|
+
- **js** — 安装、TypeScript 格式检查、lint、类型检查、构建、测试和
|
|
246
|
+
`pnpm audit`。
|
|
247
|
+
- **docs** — Markdown 格式检查(通过 `make fmt-check-md` 运行 `dprint`)。
|
|
247
248
|
- **images** — 构建 orchestrator 和 guest-agent
|
|
248
249
|
镜像(仅在测试任务通过后运行);**dsh image** 构建 `Containerfile.dsh`。
|
|
249
250
|
- **trivy** — 文件系统漏洞扫描(未修复的被忽略)和容器 错误配置扫描(DS-0002
|
|
@@ -154,21 +154,22 @@ which requires online access.
|
|
|
154
154
|
|
|
155
155
|
## Verification
|
|
156
156
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
default container on first use).
|
|
157
|
+
1. Open the sidebar's **Plugins** panel.
|
|
158
|
+
2. In the **Installed** section, click on **dsh-podman**.
|
|
159
|
+
3. Open the **Status** tab.
|
|
160
|
+
4. Check that **dsh-podman**, **dsh-podman-orchestrator** and
|
|
161
|
+
**dsh-podman-gateway** are **ready** and the versions match.
|
|
163
162
|
|
|
164
163
|
## Set Git identity (recommended)
|
|
165
164
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
1. Open the sidebar's **Plugins** panel.
|
|
166
|
+
2. In the **Installed** section, click on **dsh-podman**.
|
|
167
|
+
3. Open the **Defaults** tab.
|
|
168
|
+
4. Next to **Default environment variables**, click on **Git identity**.
|
|
169
|
+
5. Enter the name, the email and click on **Apply**.
|
|
170
|
+
6. Click on **Save**.
|
|
171
|
+
7. Click on **Add missing variables to containers**.
|
|
172
|
+
8. Choose **All containers** and click on **Apply**.
|
|
172
173
|
|
|
173
174
|
## Updating dsh & dsh-podman
|
|
174
175
|
|
|
@@ -134,18 +134,22 @@ SPDX-License-Identifier: MIT
|
|
|
134
134
|
|
|
135
135
|
## 验证
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
1. 打开侧边栏的 **插件** 面板。
|
|
138
|
+
2. 在 **已安装** 部分中,点击 **dsh-podman**。
|
|
139
|
+
3. 打开 **状态** 标签页。
|
|
140
|
+
4. 检查 **dsh-podman**、**dsh-podman-orchestrator** 和 **dsh-podman-gateway**
|
|
141
|
+
是否**就绪**且版本一致。
|
|
141
142
|
|
|
142
143
|
## 配置 Git 身份(推荐)
|
|
143
144
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
145
|
+
1. 打开侧边栏的 **插件** 面板。
|
|
146
|
+
2. 在 **已安装** 部分中,点击 **dsh-podman**。
|
|
147
|
+
3. 打开 **默认设置** 标签页。
|
|
148
|
+
4. 在 **默认环境变量** 旁边,点击 **Git 身份**。
|
|
149
|
+
5. 输入姓名和邮箱,然后点击 **应用**。
|
|
150
|
+
6. 点击 **保存**。
|
|
151
|
+
7. 点击 **为容器补上缺失的变量**。
|
|
152
|
+
8. 选择 **所有容器**,然后点击 **应用**。
|
|
149
153
|
|
|
150
154
|
## 更新 dsh 与 dsh-podman
|
|
151
155
|
|
package/docs/usage.md
CHANGED
|
@@ -147,11 +147,10 @@ guest-agent wiring.
|
|
|
147
147
|
|
|
148
148
|
New containers are also seeded with the plugin's **default environment** (the
|
|
149
149
|
`containerEnv` setting), so a git identity can be configured once instead of per
|
|
150
|
-
project — see
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
lack them.
|
|
150
|
+
project — see
|
|
151
|
+
[Default environment variables](configuration.md#default-environment-variables).
|
|
152
|
+
The Podman page's **Git identity** popup fills the four
|
|
153
|
+
`GIT_AUTHOR_*`/`GIT_COMMITTER_*` variables from one name and one email.
|
|
155
154
|
|
|
156
155
|
`container_bash` and `container_exec` run with the same command-visible
|
|
157
156
|
environment as the built-in `bash`: the harness's managed `DSH_*` facts
|
|
@@ -401,46 +400,197 @@ feature keeps working.
|
|
|
401
400
|
## Container management UI
|
|
402
401
|
|
|
403
402
|
The plugin ships a browser half that registers its card on the **dsh-podman**
|
|
404
|
-
page (sidebar **Plugins** panel
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
and
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
403
|
+
page (open the sidebar's **Plugins** panel and pick **Installed**). The page is
|
|
404
|
+
a tab set — **Workspaces**, **Images**, **Storage**, **Defaults** and **Status**
|
|
405
|
+
— under a status strip that counts the workspaces holding a container and the
|
|
406
|
+
running containers, followed by ready or not-ready chips for the orchestrator
|
|
407
|
+
and the gateway. The page re-reads the live state whenever the Plugins panel
|
|
408
|
+
opens it, and a **Reload this view** button sits below the tabs, so the reload
|
|
409
|
+
stays reachable from every tab. Card actions are direct control calls and are
|
|
410
|
+
not approval-gated.
|
|
411
|
+
|
|
412
|
+
### Workspaces
|
|
413
|
+
|
|
414
|
+
The **Workspaces** tab lists the orchestrator-created guest containers. Each
|
|
415
|
+
workspace card states in one phrase how many of its containers run and how many
|
|
416
|
+
are stopped (the stopped half greyed).
|
|
417
|
+
|
|
418
|
+
It also shows the workspace's readable name as the card title with a discreet
|
|
419
|
+
**Copy workspace ID** button beside it for its UUID, and lists each container as
|
|
420
|
+
a stacked block.
|
|
421
|
+
|
|
422
|
+
A workspace with no container gets a **Create container** button; a workspace
|
|
423
|
+
that already has containers gets an **Add container** button for additional,
|
|
424
|
+
named containers. Every workspace row also offers **Remove containers**, which
|
|
425
|
+
removes that workspace's dsh-podman containers and its pod, and the
|
|
426
|
+
orchestrator's record for it (volumes, secrets, and project data are kept, and
|
|
427
|
+
the dsh workspace itself is untouched); removing a workspace's last container
|
|
428
|
+
removes its pod as well, so an empty pod is never left behind.
|
|
429
|
+
|
|
430
|
+
#### Containers
|
|
431
|
+
|
|
432
|
+
The block's identity line carries the container name, its state chip and its
|
|
433
|
+
created time (relative, with the exact instant as a tooltip).
|
|
434
|
+
|
|
435
|
+
Its **Edit**, **Recreate** and **Remove** actions sit at the right end of that
|
|
436
|
+
line, right-aligned while the block has room and below the name once it does
|
|
437
|
+
not: **Recreate** rebuilds the container as it is once the confirmation naming
|
|
438
|
+
it is accepted.
|
|
439
|
+
|
|
440
|
+
The fields follow in the canonical order the dialogs share, each a read-only
|
|
441
|
+
field with its own copy control: environment and secret environment variables as
|
|
442
|
+
Key/Value field pairs, PATH additions as a list of directory fields, and mounts
|
|
443
|
+
and ports as per-entry fields, with every value shown in full and wrapping over
|
|
444
|
+
as many lines as it needs.
|
|
445
|
+
|
|
446
|
+
#### The container dialog
|
|
447
|
+
|
|
448
|
+
**Add container** and **Create container** open the same dialog as **Edit** —
|
|
449
|
+
the same width, the same viewport-capped height, the same group order and the
|
|
450
|
+
same footer layout — which is titled after the action that opened it and opens
|
|
451
|
+
on a **Name** group: editable in **Add container**, and read-only in the default
|
|
452
|
+
container's **Create container** and in **Edit**. **Edit** opens it holding
|
|
453
|
+
everything — the read-only name, image, environment variables, mounts, PATH
|
|
454
|
+
variable additions, secret environment variables and published ports.
|
|
455
|
+
|
|
456
|
+
The groups that follow **Name** are **Image**, **Environment variables**,
|
|
457
|
+
**Mounts**, **PATH variable additions**, **Secret environment variables** and
|
|
458
|
+
**Published ports**. Every row of an editor is the same labelled field row the
|
|
459
|
+
container block renders, with an editable control where the block has a
|
|
460
|
+
read-only field and its copy control.
|
|
461
|
+
|
|
462
|
+
The dialog caps itself to the viewport, keeping its header and its footer in
|
|
463
|
+
place while the body scrolls; **Discard** drops the draft, and the dialog's one
|
|
464
|
+
primary action applies it once the confirmation naming the container is
|
|
465
|
+
accepted: **Recreate container**, in the destructive tone, when the change
|
|
466
|
+
rebuilds the container, and **Update container**, in the neutral one, when the
|
|
467
|
+
running container takes the change.
|
|
468
|
+
|
|
469
|
+
A marker beside it names the staged changes.
|
|
470
|
+
|
|
471
|
+
The apply is refused while a variable name is empty or used twice across the
|
|
472
|
+
environment variables and the secret environment variables: the footer names the
|
|
473
|
+
conflict in red and the offending key carries a red border, and the rows it
|
|
474
|
+
names stay in place until their own **Remove**, while an unnamed row is never
|
|
475
|
+
applied.
|
|
476
|
+
|
|
477
|
+
#### Mounts
|
|
478
|
+
|
|
479
|
+
The mount rows label the kind with a short chip — **Project**, **tmpfs**,
|
|
480
|
+
**Volume** or **Secret**. In the dialog mounts are added and removed, and
|
|
481
|
+
removing one from a live container is confirmed.
|
|
482
|
+
|
|
483
|
+
Adding one selects its kind, and for a project mount the project itself, from
|
|
484
|
+
which the destination path is derived: the project's path mirrored under the
|
|
485
|
+
projects root, previewed in a read-only field, since a project mount never takes
|
|
486
|
+
a destination of its own.
|
|
487
|
+
|
|
488
|
+
When a container is being created or added, each project or volume mount's mode
|
|
489
|
+
is a dropdown (read-only/read-write), so the workspace project mount can be
|
|
490
|
+
created read-only in one step, while secret and tmpfs mounts carry no mode
|
|
491
|
+
control at all.
|
|
492
|
+
|
|
493
|
+
The default container's main project mount keeps its **Remove** greyed out and
|
|
494
|
+
disabled, with that fact as its tooltip, since it cannot be removed.
|
|
495
|
+
|
|
496
|
+
#### Environment variables
|
|
497
|
+
|
|
498
|
+
Environment variables are edited in Key/Value rows, each carrying its own
|
|
499
|
+
visible labels and a **Remove** named after the variable.
|
|
500
|
+
|
|
501
|
+
**Add container** and **Create container** open their **Environment variables**
|
|
502
|
+
group on the workspace's default environment variables, so the values a new
|
|
503
|
+
container inherits are visible; a value left alone keeps the default and an
|
|
504
|
+
edited one becomes that container's own.
|
|
505
|
+
|
|
506
|
+
Secret environment variables are attached by adding a row and picking a named
|
|
507
|
+
secret, with the variable name editable in place like an environment variable's
|
|
508
|
+
key, switched to another secret in place, or removed from that row's own
|
|
509
|
+
**Remove**. A workspace without secrets offers **Create secret** in place of the
|
|
510
|
+
secret picker, opening the secret form on top of the dialog.
|
|
511
|
+
|
|
512
|
+
A variable name is required and must be unique across the environment variables
|
|
513
|
+
and the secret environment variables.
|
|
514
|
+
|
|
515
|
+
#### PATH additions and ports
|
|
516
|
+
|
|
517
|
+
PATH variable additions are edited from an **Edit PATH additions** button, whose
|
|
518
|
+
dialog lists one **Path** field per entry and prepends another with **Add
|
|
519
|
+
entry**; the UI calls them **PATH variable additions**, where the tool section
|
|
520
|
+
below calls them PATH additions.
|
|
521
|
+
|
|
522
|
+
The dialog's **Published ports** group lists the ports exposed on the host, and
|
|
523
|
+
a **Publish port** button opens a popup for the container port, the protocol
|
|
524
|
+
(only tcp is implemented today) and, optionally, the host port to prefer;
|
|
525
|
+
confirming the popup stages the addition — the gateway chooses a free host port
|
|
526
|
+
when none is given, and the notice names the endpoint it bound.
|
|
527
|
+
|
|
528
|
+
A port the gateway has not bound yet keeps the host port it was asked for with
|
|
529
|
+
**(pending)** appended. Publishing is disabled with a hint while the gateway is
|
|
530
|
+
not running or the container is stopped, and a port already exposed to the host
|
|
531
|
+
is unpublished again from its own **Unpublish** action once the confirmation
|
|
532
|
+
naming it is accepted.
|
|
533
|
+
|
|
534
|
+
### Images
|
|
535
|
+
|
|
536
|
+
The **Images** tab lists the built images, on a **Base images** card and a
|
|
537
|
+
**Custom images** card. It can rebuild a single image or **Rebuild all images**
|
|
538
|
+
in dependency order.
|
|
539
|
+
|
|
540
|
+
Each image row is a block whose first line is the image name, its status and its
|
|
541
|
+
**Rebuild**/**Set default** actions (right-aligned while the block has room,
|
|
542
|
+
below the name once it does not), followed by labelled lines for its build time
|
|
543
|
+
(only when the image was built; relative, with the exact instant as a tooltip),
|
|
544
|
+
its parent image and its packages (chips on their own line).
|
|
545
|
+
|
|
546
|
+
A custom image carries a destructive **Remove** in that same action group rather
|
|
547
|
+
than on a line of its own.
|
|
548
|
+
|
|
549
|
+
**Build custom image**, on the **Custom images** card, opens a popup with an
|
|
550
|
+
image-name form and a parent-image select preselected to the default image, plus
|
|
551
|
+
a chip input for the package list (type a name and press space/comma, or paste a
|
|
552
|
+
list, to add removable chips, which appear below the input).
|
|
553
|
+
|
|
554
|
+
### Storage
|
|
555
|
+
|
|
556
|
+
Volumes and secrets are listed as individual expandable rows, each with its own
|
|
557
|
+
actions.
|
|
558
|
+
|
|
433
559
|
**Create volume** / **Create secret** open popup forms (the secret form takes an
|
|
434
|
-
optional length
|
|
435
|
-
|
|
560
|
+
optional length).
|
|
561
|
+
|
|
562
|
+
A secret row carries **Edit** and then **Remove**: **Edit** opens the same form,
|
|
563
|
+
whose **New value** field can be set or overwritten but never read back, and
|
|
564
|
+
**Remove** drops the secret.
|
|
436
565
|
|
|
437
566
|
A **Package caches** section reports the size of every configured build cache
|
|
438
567
|
(`DSH_PODMAN_HOST_PACMAN_CACHE`, `DSH_PODMAN_HOST_APT_CACHE`,
|
|
439
568
|
`DSH_PODMAN_HOST_APK_CACHE`) and offers two cleanup actions: **Keep latest
|
|
440
569
|
versions** removes every cached package file except the newest of each package
|
|
441
|
-
(and the signature it carried), and **Remove all** empties the caches.
|
|
442
|
-
|
|
443
|
-
|
|
570
|
+
(and the signature it carried), and **Remove all** empties the caches.
|
|
571
|
+
|
|
572
|
+
Both are safe — a cached package is only ever re-downloaded — and neither runs
|
|
573
|
+
while an image build is in progress.
|
|
574
|
+
|
|
575
|
+
### Defaults
|
|
576
|
+
|
|
577
|
+
The **Defaults** tab shows the effective default image in a labelled select —
|
|
578
|
+
the configured one, or the first base image, marked as such — and its **Default
|
|
579
|
+
environment variables**.
|
|
580
|
+
|
|
581
|
+
A **Git identity** button opens a popup for a name and an email, filling the
|
|
582
|
+
four `GIT_AUTHOR_*`/`GIT_COMMITTER_*` variables in the draft.
|
|
583
|
+
|
|
584
|
+
An **Add missing variables to containers** action opens a dialog that applies
|
|
585
|
+
the default environment variables to every container or to one workspace's
|
|
586
|
+
containers, listing the variables it would add.
|
|
587
|
+
|
|
588
|
+
### Status
|
|
589
|
+
|
|
590
|
+
The **Status** tab lists the harness, this plugin and the two daemons in a
|
|
591
|
+
component table with their runtime state, version and commit.
|
|
592
|
+
|
|
593
|
+
A version divergence is named beside the state it qualifies.
|
|
444
594
|
|
|
445
595
|
## Podman terminal
|
|
446
596
|
|