-
Notifications
You must be signed in to change notification settings - Fork 0
chore: replace multiple devcontainers with a single mise-based one #179
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
Changes from all commits
9d52fff
ce7e0d7
7b81af9
a78c6f7
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,32 @@ | ||
| FROM mcr.microsoft.com/devcontainers/base:bookworm | ||
|
|
||
| ARG MISE_VERSION=2026.5.12 | ||
|
|
||
| # Download mise binary from GitHub release and verify checksum | ||
| RUN set -eux; \ | ||
| case "$(uname -m)" in \ | ||
| x86_64) FILE="mise-v${MISE_VERSION}-linux-x64"; SHA256="a238972a3162d710b85b28c324372e96ca4e4b486c81fe78695000d9fbc77c48" ;; \ | ||
| aarch64) FILE="mise-v${MISE_VERSION}-linux-arm64"; SHA256="fd2d5227a8ad0b1e359c70527a8345a9ada72077f8dcbb559371653c3d95464f" ;; \ | ||
| *) echo "Unsupported arch: $(uname -m)" && exit 1 ;; \ | ||
| esac; \ | ||
| wget -O /usr/local/bin/mise \ | ||
| "https://github.com/jdx/mise/releases/download/v${MISE_VERSION}/${FILE}"; \ | ||
| echo "${SHA256} /usr/local/bin/mise" | sha256sum -c; \ | ||
| chmod +x /usr/local/bin/mise | ||
|
|
||
| # Store tools in a shared location accessible to all users, and put shims on PATH | ||
| # so installed tools work in non-interactive shells (CI, devcontainer postCreateCommand, etc.) | ||
| ENV MISE_DATA_DIR=/usr/local/share/mise \ | ||
| MISE_TRUSTED_CONFIG_PATHS=/workspaces \ | ||
| PATH=/usr/local/share/mise/shims:$PATH | ||
|
|
||
| # Pre-install all runtimes pinned in the lockfile (build context is repo root). | ||
| # The config is installed to /etc/mise/ as a system-wide default so shims work | ||
| # in any shell, even outside the workspace directory. | ||
| COPY mise.toml mise.lock /etc/mise/ | ||
| RUN chmod a+r /etc/mise/mise.toml /etc/mise/mise.lock \ | ||
| && mise trust /etc/mise/mise.toml \ | ||
| && cd /etc/mise && mise install | ||
|
|
||
| # Activate mise for interactive shells | ||
| RUN echo 'eval "$(mise activate bash)"' >> /home/vscode/.bashrc | ||
|
qw-in marked this conversation as resolved.
|
||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,19 @@ | ||
| // For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
| // README at: https://github.com/devcontainers/templates/tree/main/src/javascript-node | ||
| { | ||
| "name": "node-24 (recommended)", | ||
| // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
| "image": "mcr.microsoft.com/devcontainers/javascript-node:24", | ||
| // Use 'runArgs' to specify additional docker run arguments. | ||
| "runArgs": ["--name", "arcjet-examples-node-24"], | ||
|
|
||
| // Features to add to the dev container. More info: https://containers.dev/features. | ||
| "features": { | ||
| "ghcr.io/trunk-io/devcontainer-feature/trunk:1": {} | ||
| "build": { | ||
| "context": "..", | ||
| "dockerfile": "Dockerfile" | ||
| }, | ||
|
|
||
| // Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
| // "forwardPorts": [], | ||
|
|
||
| // Use 'postCreateCommand' to run commands after the container is created. | ||
| "postCreateCommand": "bash -i -c 'nvm install 24 --latest-npm'", | ||
|
|
||
| // Configure tool-specific properties. | ||
| "customizations": { | ||
| "vscode": { | ||
| "extensions": [ | ||
| "astro-build.astro-vscode", | ||
| "denoland.vscode-deno", | ||
| "svelte.svelte-vscode", | ||
| "tamasfe.even-better-toml", | ||
| "Vue.volar" | ||
| ] | ||
| } | ||
| } | ||
|
|
||
| // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
| // "remoteUser": "root" | ||
| }, | ||
| "name": "arcjet-examples", | ||
| "runArgs": ["--name", "arcjet-examples"] | ||
| } |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.