From af727df4a273e5343c7e8a53cb16b04f0b3179e8 Mon Sep 17 00:00:00 2001 From: Samuel Bronson Date: Wed, 4 Dec 2024 13:20:45 -0500 Subject: [PATCH 1/2] devcontainer.json: Enable sshd This allows e.g. "gh codespace ssh" to work. --- .devcontainer/devcontainer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 97bc8ce10502..635cac4e718c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,10 @@ { "name": "TypeScript Website codespace", "dockerFile": "Dockerfile", - + "features": { + "ghcr.io/devcontainers/features/sshd:1": {} + }, + // Set *default* container specific settings.json values on container create. "settings": { "terminal.integrated.shell.linux": "/bin/bash" From c74bfc726f5fe82337c2e201ec5340b6aa208ada Mon Sep 17 00:00:00 2001 From: Samuel Bronson Date: Wed, 4 Dec 2024 20:29:11 +0000 Subject: [PATCH 2/2] devcontainer.json: start install/bootstrap automatically That way, the user can create their devcontainer and then go "grab coffee" right away, instead of having to wait for the container to start, run "pnpm install && pnpm bootstrap", and only *then* go for their coffee. --- .devcontainer/devcontainer.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 635cac4e718c..34aededcd854 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,6 +5,13 @@ "ghcr.io/devcontainers/features/sshd:1": {} }, + // Pre-fetch packages + "updateContentCommand": "pnpm fetch", + // Might as well get started on this right away + "postCreateCommand": "pnpm install && pnpm bootstrap", + // Don't block editor startup on fetching packages + "waitFor": "onCreateCommand", + // Set *default* container specific settings.json values on container create. "settings": { "terminal.integrated.shell.linux": "/bin/bash"