Skip to content

Build the Docker image with Vite+ - #2435

Merged
kmcginnes merged 1 commit into
mainfrom
docker-vite-plus
Oct 18, 2026
Merged

kmcginnes merged 1 commit into
mainfrom
docker-vite-plus

Conversation

@kmcginnes

Copy link
Copy Markdown
Collaborator

Summary

The Dockerfile pinned Node.js a second time in ENV NODE_VERSION, downloaded it with curl | tar and no checksum, and installed pnpm through a pinned Corepack. The build and deps stages now run in the official Vite+ image. It installs the Node.js in .node-version and the pnpm in packageManager, verifies both, and the runtime stays on the same Amazon Linux 2023 snapshot.

-FROM amazonlinux:2023.… AS os
-ENV NODE_VERSION=24.21.0
-FROM os AS toolchain            # curl nodejs.org | tar, npm i -g corepack@0.36.0
+FROM ghcr.io/voidzero-dev/vite-plus:1.1.0@sha256:… AS toolchain
 FROM toolchain AS build          vp install, vp run build, export node + LICENSE
 FROM toolchain AS deps           vp install --prod
-FROM os AS runtime
+FROM amazonlinux:2023.… AS runtime

.node-version is now the only Node.js pin the image uses. test_build_docker.yml checks that the image's node --version matches it. docs/development.md and the Dependabot comments drop the Corepack and NODE_VERSION notes.

Evidence

Before: the image's Node.js came from ENV NODE_VERSION, with no signature or checksum check, and pnpm came from Corepack 0.36.0.
After: the image builds with Done in 15.7s using pnpm v12.8.1. The new CI step reports ✓ node v24.21.0, which matches .node-version.

Compared with an image built from current main:

  • Contents: every file under /graph-explorer and /usr/local is byte-identical, with the same owners and modes. The only exceptions are Dockerfile and pnpm's install metadata. /usr/local/bin/node has the same SHA-256, so Vite+ fetched the same official build.
  • Config: ExposedPorts, Entrypoint, WorkingDir, User, PATH and HOME are unchanged. NODE_VERSION is gone from the image environment.
  • Size: 875 MB, the same as before.
  • Trivy: no HIGH or CRITICAL findings.

Verified live: I ran both images through every documented deployment path and compared the results:

  • Startup: both answer /status over HTTP on 80, in notebook mode on 9250, and over HTTPS on 443.
  • Config: a mounted config.json, read-write and read-only, gives identical .env, defaultConnection.json and /defaultConnection.
  • Config folder: a CONFIGURATION_FOLDER_PATH folder with a user .env ends up with identical contents.
  • Certificates: bind-mounted user certificates are served the same way, and a restart keeps the same certificate.
  • Upgrade from 3.3.0: a config folder and a cert-info named volume written by the published 3.3.0 image work unchanged on the new image. The volume serves the same certificate fingerprint.
  • Stop: docker stop takes 0.13s and exits 0.

Merge Danger

Door: two-way

Impact: Docker image

The shipped image has the same contents and behavior. One environment variable disappears: NODE_VERSION is no longer set inside the container. Nothing in this repo reads it, and it was only ever set to report the build's Node.js version. Builds now pull ghcr.io/voidzero-dev/vite-plus, pinned by digest, in addition to the Amazon Linux image.

Related

@kmcginnes kmcginnes left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@kmcginnes
kmcginnes merged commit f5ef870 into main Oct 18, 2026
6 checks passed
@kmcginnes
kmcginnes deleted the docker-vite-plus branch October 18, 2026 15:31
kmcginnes added a commit that referenced this pull request Oct 19, 2026
…s differ (#2442)

## Summary

The Vite+ image tag in the `Dockerfile` and the `vite-plus` catalog
version in `pnpm-workspace.yaml` must be the same release. Only comments
kept them in step, and Dependabot opens a separate PR for each, so one
could merge without the other. The Docker test build now fails while
they differ.

**User-facing:** none

```diff
 test-build-docker-image
   Checkout
+  Ensure the Vite+ image matches the vite-plus catalog version
   Build Docker image
   ...
```

It also carries 3 review fixes from #2435 that missed its merge:

- **`docs/development.md`:** a Vite+ upgrade changes both pins in the
same PR.
- **`docs/development.md`:** `docker build` pulls from `ghcr.io` as well
as `public.ecr.aws`, so a registry allowlist needs both.
- **`Dockerfile`:** a comment ties the `rm -rf ...
packages/*/node_modules` glob to `pnpm-workspace.yaml`, and says why it
isn't `vp run clean:dep`.

## Evidence

**Before:** a Dockerfile on `vite-plus:1.2.0` with the catalog on
`1.1.0` passed CI.
**After:** I ran the new step locally against each case:

- `1.1.0` in both: passes
- Catalog bumped to `1.2.0`: `FAIL: Dockerfile has vite-plus:1.1.0,
pnpm-workspace.yaml has vite-plus 1.2.0`
- Dockerfile tag bumped to `1.2.0`: fails
- `FROM` line without a tag and digest: fails
- Quoted catalog value (`"1.1.0"`): passes

## Merge Danger

**Door:** two-way

**Impact:** CI

The image doesn't change. A future Vite+ bump PR fails the Docker test
build until both pins move together.

## Related

- Related to #2435
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant