Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
FROM ghcr.io/devcontainer-config/features/dotnet/sdk:10 as dotnet

FROM mcr.microsoft.com/devcontainers/javascript-node:24-bookworm

RUN apt-get update \
Expand All @@ -10,3 +12,5 @@ RUN apt-get update \

RUN mkdir --parents /usr/share/dotnet /usr/share/devcontainer-config/NuGet/global-packages \
&& chmod --recursive a+rwX /usr/share/dotnet /usr/share/devcontainer-config

COPY --from=dotnet /features/dotnet/ /opt/devcontainer-config/features/dotnet/
5 changes: 3 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
"features": {
// "ghcr.io/devcontainer-config/features/user-init:3": {},
// "ghcr.io/devcontainer-config/features/dot-config:4": {},
// "ghcr.io/devcontainer-config/features/features": {},
"./features/src/user-init": {},
"./features/src/dot-config": {},
"./features/src/features": {},
"./features/src/unset-git-credential-helper": {},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/dotnet:2": { "version": "10.0" }
"ghcr.io/devcontainers/features/docker-in-docker:4": {}
},
"customizations": {
"vscode": {
Expand Down
6 changes: 3 additions & 3 deletions .devcontainer/features/test/features/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { expect, test } from "vitest";

const featuresRun = "/opt/devcontainer-config/features-run";
const featuresPathFile = "/opt/devcontainer-config/features-path";
const hooks = ["install", "entrypoint", "onCreate", "updateContent", "postCreate", "postStart", "postAttach"] as const;
const lifecycleHooks = ["onCreate", "updateContent", "postCreate", "postStart", "postAttach"] as const;

test("dispatcher is installed as an executable file", async () => {
const stats = await stat(featuresRun);
Expand All @@ -28,9 +28,9 @@ test("unknown or missing hook exits 1", async () => {
expect(missing.exitCode).toBe(1);
});

test("every hook exits 0 with no features staged", async () => {
test("every lifecycle hook exits 0 with features staged", async () => {
const $$ = $({ reject: false, verbose: "short" });
for (const hook of hooks) {
for (const hook of lifecycleHooks) {
const result = await $$`${featuresRun} ${hook}`;
expect(result.exitCode).toBe(0);
}
Expand Down
Loading