Repository navigation
Create devcontainer.json #1282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create devcontainer.json #1282
Changes from all commits
0b25e7b
e73509b
b0776b8
05cd7f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| FROM cgr.dev/chainguard/wolfi-base:latest | ||
|
Check warning on line 2 in .devcontainer/Containerfile
|
||
|
|
||
| RUN apk add --no-cache bash ca-certificates coreutils git just | ||
|
|
||
| # Wolfi already provides nonroot with /home/nonroot. | ||
| ENV SHELL=/bin/bash | ||
| USER nonroot | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"build":{"context":"..","dockerfile":"Containerfile"},"containerEnv":{"EDITOR":"code --wait","HOME":"/home/nonroot","LANG":"C.UTF-8"},"containerUser":"nonroot","customizations":{"vscode":{"extensions":["EditorConfig.EditorConfig","eamodio.gitlens","streetsidesoftware.code-spell-checker","timonwong.shellcheck","tamasfe.even-better-toml","skellock.just","redhat.vscode-yaml","DavidAnson.vscode-markdownlint","asciidoctor.asciidoctor-vscode","usernamehw.errorlens"],"settings":{"[makefile]":{"editor.insertSpaces":false},"editor.formatOnSave":true,"editor.insertSpaces":true,"editor.tabSize":2,"files.insertFinalNewline":true,"files.trimFinalNewlines":true,"files.trimTrailingWhitespace":true}}},"name":"{{PROJECT_NAME}} (Codespaces)","postCreateCommand":"just deps","remoteUser":"nonroot","shutdownAction":"stopContainer","updateRemoteUserUID":false} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Once the image build is fixed, container setup still reports a lifecycle-command failure because the repository's root Useful? React with πΒ / π.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you make that addition to the Justfile?
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, can you add this to the Justfile recipes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This new configuration omits its licence identifier even though Useful? React with πΒ / π.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah, yes, it should have the MPL-2.0 (code) CC-BY-SA-4.0 (prose) indication, can you fix that?
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, the MPL-2.0 (code) and CC-SA-BY-4.0 (prose) is correct, not sure why that is omitted, unless it is due to an incompatibility with ijson-jcs (in https://github.com/hyperpolymath/ijson-jcs - or if that is the one in need of change?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π©Ί Stability & Availability | π Major | β‘ Quick win π Supported by static analysisπ Script executed: #!/bin/bash
set -euo pipefail
rg -n -i -C 2 '\bjust\b|^\s*deps\s*:' --glob '!**/.git/**' .Repository: hyperpolymath/standards Length of output: 45602 π Script executed: set -euo pipefail
printf '%s\n' '--- PR diff ---'
git diff --no-ext-diff --unified=40 8ff9ce65f7e54f8d5c5aa94584e2ead0f2ba460f 0b25e7bc3970be65aa2f3558d0850d1c5c22c846 -- .devcontainer/devcontainer.json
printf '%s\n' '--- reviewed configuration ---'
nl -ba .devcontainer/devcontainer.json
printf '%s\n' '--- directly bound build files ---'
for path in Containerfile Justfile justfile .devcontainer/Containerfile .devcontainer/Justfile; do
if [ -f "$path" ]; then
printf '\n--- %s ---\n' "$path"
nl -ba "$path"
fi
done
printf '%s\n' '--- relevant declarations and installation commands ---'
rg -n -F --glob '!**/.git/**' -e 'postCreateCommand' -e 'deps:' -e 'install.*just' -e 'apk add just' -e 'apt-get install.*just' -e 'dnf install.*just' -e 'pacman.*just' -e 'cargo install just' -e 'just-' -e 'just ' -- .devcontainer Containerfile Justfile justfile setup.sh QUICKSTART-DEV.adoc QUICKSTART-MAINTAINER.adoc 2>/dev/null || test "$?" -eq 1
printf '%s\n' '--- relevant root entries at reviewed head ---'
git ls-tree --name-only 0b25e7bc3970be65aa2f3558d0850d1c5c22c846 | sed -n '1,120p'Repository: hyperpolymath/standards Length of output: 20980 Provide the
π€ Prompt for AI Agentsπ― Functional Correctness | π Major | β‘ Quick win π Supported by static analysisπ Script executed: #!/bin/bash
set -euo pipefail
for file in .devcontainer/Containerfile Containerfile; do
if test -f "$file"; then
printf 'found: %s\n' "$file"
else
printf 'missing: %s\n' "$file"
fi
doneRepository: hyperpolymath/standards Length of output: 221 π Script executed: set -eu
printf '%s\n' '--- container build files ---'
find . -type f \( -iname 'Containerfile' -o -iname 'Dockerfile' -o -iname 'Dockerfile.*' \) -not -path './.git/*' -print
printf '%s\n' '--- devcontainer configuration ---'
nl -ba .devcontainer/devcontainer.json
printf '%s\n' '--- comparison ---'
git diff --stat 8ff9ce65f7e54f8d5c5aa94584e2ead0f2ba460f 0b25e7bc3970be65aa2f3558d0850d1c5c22c846 -- .devcontainer
git diff --no-ext-diff --unified=20 8ff9ce65f7e54f8d5c5aa94584e2ead0f2ba460f 0b25e7bc3970be65aa2f3558d0850d1c5c22c846 -- .devcontainer/devcontainer.jsonRepository: hyperpolymath/standards Length of output: 2598 π Web query:
π‘ Result: Add the referenced container file.
π€ Prompt for AI Agents
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this something you didd, @CodeRabbit, or just suggestions - can you look at hte matter in #242 and see if the answer can be worked out from there?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π§© Analysis chainπ Script executed: #!/bin/bash
set -euo pipefail
gh api repos/hyperpolymath/standards/issues/242 --jq '{number,title,state,body,html_url,pull_request}'
gh api --paginate repos/hyperpolymath/standards/issues/242/comments --jq '.[] | {user:.user.login,body,html_url}'Length of output: 4832 π Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- current configuration ---'
if test -f .devcontainer/devcontainer.json; then
nl -ba .devcontainer/devcontainer.json
fi
printf '%s\n' '--- build and recipe file locations ---'
fd --hidden --exclude .git -i '^(Containerfile|Dockerfile|Justfile|justfile)(\..*)?$' .
printf '%s\n' '--- root recipe declarations ---'
for file in Justfile justfile; do
if test -f "$file"; then
rg -n -C 3 '(^[[:alnum:]_-]+[^[:space:]]*.*:|deps|import|mod)' "$file" || true
fi
doneLength of output: 12731
I checked The current code still has both problems:
The next step is to define the intended development environment. Then the configuration can reference a suitable container file and run a supported setup command. Adding an empty If you meant You are interacting with an AI system.
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. are you able to create it but as a Containerfile if it can, which I do think Docker accepts, if it does not, do it as a Dockerfile, and if if not adjust the direction that is given to resolve it to that Containerfile
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @hyperpolymath Yes. Docker accepts a file named Thanks for the naming guidance. Iβll start the code-change planning workflow with this scope:
βοΈ Learnings added
Failed to start Coding Agent task. Please try again. You are interacting with an AI system. |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This configuration cannot build because
dockerfilepaths are resolved relative todevcontainer.json, so this selects.devcontainer/Containerfile; neither that file nor a rootContainerfileexists in the reviewed commit tree. Thecontextsetting does not change that path resolution, so opening this repository in Codespaces or Dev Containers fails before creating the container. Add the intended Containerfile or reference an existing build definition. See the Dev Container Dockerfile guide.Useful? React with πΒ / π.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you look at the situation that is listed in pull #242 and you will see the problem and maybe the solution?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useful but see #242 to see the complexity then address as is best possible