Skip to content

Fix Dev Container permissions and local Jekyll build - #1871

Open
nilshoffmann wants to merge 1 commit into
elixir-europe:masterfrom
nilshoffmann:devcontainer-fixes
Open

Fix Dev Container permissions and local Jekyll build#1871
nilshoffmann wants to merge 1 commit into
elixir-europe:masterfrom
nilshoffmann:devcontainer-fixes

Conversation

@nilshoffmann

Copy link
Copy Markdown

With a recent vscode-insiders version and the stock devcontainer, I was not able to build the RDMkit pages without errors related to access rights.

The jekyll devcontainer image sets GEM_HOME to the root-owned /usr/local/bundle, so gem installs as the non-root vscode user fail with Bundler::PermissionError. Point Bundler at a user-owned directory backed by a named volume instead.

I also had to mark the workspace as a safe git directory and set PAGES_REPO_NWO. The workspace is a bind mount whose owner uid git can read as root, which makes it refuse to run there; jekyll-github-metadata then finds no origin remote and the build fails. Supplying the repository name directly is what the CI workflows already do, and it is also required for "make build", which sets JEKYLL_ENV=production and so skips the git fallback entirely.

The devcontainer exposes port 4000 which allows to access the development version of the RDMkit page when served with make dev

The jekyll devcontainer image sets GEM_HOME to the root-owned
/usr/local/bundle, so gem installs as the non-root vscode user fail with
Bundler::PermissionError. Point Bundler at a user-owned directory backed
by a named volume instead.

Also mark the workspace as a safe git directory and set PAGES_REPO_NWO.
The workspace is a bind mount whose owner uid git can read as root, which
makes it refuse to run there; jekyll-github-metadata then finds no origin
remote and the build fails. Supplying the repository name directly is what
the CI workflows already do, and it is also required for "make build",
which sets JEKYLL_ENV=production and so skips the git fallback entirely.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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