mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
3e750d104f
Devcontainers support custom `Dockerfile`s, but it seems like it's more recommended to use a base image with "features" on top: https://containers.dev/implementors/features/ Features get applied after the `Dockerfile`, so e.g. if we're installing `rust` with a feature, then we can't install things that depend on `rust` (e.g. `cargo-nextest`: https://nexte.st/) in the `Dockerfile`. So you're forced to do things with features instead, which can specify dependencies and ordering requirements. I removed a bunch of comments that were left over from the template. People wishing to update this file should refer to the https://aka.ms/devcontainer.json link at the top of the file. Also added a lockfile for the features, generated with: ``` devcontainer upgrade --workspace-folder=. ``` **Note:** The `base.Dockerfile` here was entirely unused. ### Testing ``` podman stop --all && podman rm --all # replace podman with docker if you're using docker devcontainer up --workspace-folder=. devcontainer exec --workspace-folder=. zsh ```
20 lines
940 B
JSON
20 lines
940 B
JSON
{
|
|
"features": {
|
|
"ghcr.io/devcontainers/features/git:1": {
|
|
"version": "1.3.4",
|
|
"resolved": "ghcr.io/devcontainers/features/git@sha256:f24645e64ad39a596131a50ec96f7d5cf7a2a87544cce772dd4b7182a233e98a",
|
|
"integrity": "sha256:f24645e64ad39a596131a50ec96f7d5cf7a2a87544cce772dd4b7182a233e98a"
|
|
},
|
|
"ghcr.io/devcontainers/features/github-cli:1": {
|
|
"version": "1.0.14",
|
|
"resolved": "ghcr.io/devcontainers/features/github-cli@sha256:ca677566507c4118e4368cd76a4800807e911e5e350cc3525fb67ebc9132dfa1",
|
|
"integrity": "sha256:ca677566507c4118e4368cd76a4800807e911e5e350cc3525fb67ebc9132dfa1"
|
|
},
|
|
"ghcr.io/devcontainers/features/rust:1": {
|
|
"version": "1.5.0",
|
|
"resolved": "ghcr.io/devcontainers/features/rust@sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c",
|
|
"integrity": "sha256:0c55e65f2e3df736e478f26ee4d5ed41bae6b54dac1318c443e31444c8ed283c"
|
|
}
|
|
}
|
|
}
|