chore: add reproducible Dev Container (#510)
Supersedes the Docker Compose development setup proposed in #118.
This commit is contained in:
parent
3ee3708d71
commit
5d66cb68a6
34
.devcontainer/Dockerfile
Normal file
34
.devcontainer/Dockerfile
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
FROM oven/bun@sha256:b86c67b531d87b4db11470d9b2bd0c519b1976eee6fcd71634e73abfa6230d2e
|
||||||
|
|
||||||
|
# Bun 1.3.10, pinned to the multi-platform image digest.
|
||||||
|
|
||||||
|
ARG CA_CERTIFICATES_VERSION=20250419
|
||||||
|
ARG GIT_VERSION=1:2.47.3-0+deb13u1
|
||||||
|
ARG GIT_LFS_VERSION=3.6.1-1+deb13u1
|
||||||
|
ARG OPENSSH_CLIENT_VERSION=1:10.0p1-7+deb13u4
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& apt-get install --yes --no-install-recommends \
|
||||||
|
ca-certificates=${CA_CERTIFICATES_VERSION} \
|
||||||
|
git=${GIT_VERSION} \
|
||||||
|
git-lfs=${GIT_LFS_VERSION} \
|
||||||
|
openssh-client=${OPENSSH_CLIENT_VERSION} \
|
||||||
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
|
&& git lfs install --system \
|
||||||
|
&& install -d -o bun -g bun \
|
||||||
|
/workspace/open-pencil/node_modules \
|
||||||
|
/workspace/open-pencil/packages/scene-graph/node_modules \
|
||||||
|
/workspace/open-pencil/packages/pen/node_modules \
|
||||||
|
/workspace/open-pencil/packages/kiwi/node_modules \
|
||||||
|
/workspace/open-pencil/packages/fig/node_modules \
|
||||||
|
/workspace/open-pencil/packages/core/node_modules \
|
||||||
|
/workspace/open-pencil/packages/dom-css/node_modules \
|
||||||
|
/workspace/open-pencil/packages/vue/node_modules \
|
||||||
|
/workspace/open-pencil/packages/cli/node_modules \
|
||||||
|
/workspace/open-pencil/packages/mcp/node_modules \
|
||||||
|
/workspace/open-pencil/packages/docs/node_modules \
|
||||||
|
/workspace/open-pencil/tools/docs/node_modules
|
||||||
|
|
||||||
|
USER bun
|
||||||
37
.devcontainer/devcontainer.json
Normal file
37
.devcontainer/devcontainer.json
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
|
||||||
|
"name": "OpenPencil",
|
||||||
|
"build": {
|
||||||
|
"dockerfile": "Dockerfile",
|
||||||
|
"context": "."
|
||||||
|
},
|
||||||
|
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace/open-pencil,type=bind,consistency=cached",
|
||||||
|
"workspaceFolder": "/workspace/open-pencil",
|
||||||
|
"remoteUser": "bun",
|
||||||
|
"updateRemoteUserUID": true,
|
||||||
|
"mounts": [
|
||||||
|
"source=open-pencil-root-modules-${devcontainerId},target=/workspace/open-pencil/node_modules,type=volume",
|
||||||
|
"source=open-pencil-scene-graph-modules-${devcontainerId},target=/workspace/open-pencil/packages/scene-graph/node_modules,type=volume",
|
||||||
|
"source=open-pencil-pen-modules-${devcontainerId},target=/workspace/open-pencil/packages/pen/node_modules,type=volume",
|
||||||
|
"source=open-pencil-kiwi-modules-${devcontainerId},target=/workspace/open-pencil/packages/kiwi/node_modules,type=volume",
|
||||||
|
"source=open-pencil-fig-modules-${devcontainerId},target=/workspace/open-pencil/packages/fig/node_modules,type=volume",
|
||||||
|
"source=open-pencil-core-modules-${devcontainerId},target=/workspace/open-pencil/packages/core/node_modules,type=volume",
|
||||||
|
"source=open-pencil-dom-css-modules-${devcontainerId},target=/workspace/open-pencil/packages/dom-css/node_modules,type=volume",
|
||||||
|
"source=open-pencil-vue-modules-${devcontainerId},target=/workspace/open-pencil/packages/vue/node_modules,type=volume",
|
||||||
|
"source=open-pencil-cli-modules-${devcontainerId},target=/workspace/open-pencil/packages/cli/node_modules,type=volume",
|
||||||
|
"source=open-pencil-mcp-modules-${devcontainerId},target=/workspace/open-pencil/packages/mcp/node_modules,type=volume",
|
||||||
|
"source=open-pencil-docs-modules-${devcontainerId},target=/workspace/open-pencil/packages/docs/node_modules,type=volume",
|
||||||
|
"source=open-pencil-docs-tool-modules-${devcontainerId},target=/workspace/open-pencil/tools/docs/node_modules,type=volume"
|
||||||
|
],
|
||||||
|
"postCreateCommand": "if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then git lfs pull; fi && bun install --frozen-lockfile",
|
||||||
|
"containerEnv": {
|
||||||
|
"TAURI_DEV_HOST": "0.0.0.0"
|
||||||
|
},
|
||||||
|
"forwardPorts": [1420],
|
||||||
|
"portsAttributes": {
|
||||||
|
"1420": {
|
||||||
|
"label": "OpenPencil web editor",
|
||||||
|
"onAutoForward": "notify"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -4,6 +4,7 @@
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
|
- Add a reproducible Dev Container for web, package, CLI, and non-browser test development.
|
||||||
- Add local crash recovery for unsaved and pathless documents, including MCP-created documents. (#487)
|
- Add local crash recovery for unsaved and pathless documents, including MCP-created documents. (#487)
|
||||||
- Add isolated visual inspection that sends bounded selection renders to the configured Vision model and returns text findings without retaining image data in Design chat history. (#232, #471)
|
- Add isolated visual inspection that sends bounded selection renders to the configured Vision model and returns text findings without retaining image data in Design chat history. (#232, #471)
|
||||||
- Allow supported AI model profiles to set a provider-specific reasoning effort. (#454)
|
- Allow supported AI model profiles to set a provider-specific reasoning effort. (#454)
|
||||||
|
|
|
||||||
|
|
@ -255,6 +255,10 @@ bun run dev # Dev server at localhost:1420
|
||||||
bun run tauri dev # Desktop app (requires Rust)
|
bun run tauri dev # Desktop app (requires Rust)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Alternatively, open the repository in any [Dev Container](https://containers.dev/)-compatible tool. The container pins Bun, installs the workspace dependencies, and forwards the web editor on port 1420. Start it with `bun run dev` after the container is ready.
|
||||||
|
|
||||||
|
The Dev Container supports the web editor, packages, CLI, and automated checks. Native Tauri development still requires the host setup described below because desktop windows and platform WebView dependencies are not provided in the container.
|
||||||
|
|
||||||
### Quality gates
|
### Quality gates
|
||||||
|
|
||||||
| Command | Description |
|
| Command | Description |
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue