Skip to content

chore: optimize devcontainer for Codespaces prebuilds#54

Merged
DanWahlin merged 1 commit intomainfrom
devcontainer/prebuild-optimization
Apr 6, 2026
Merged

chore: optimize devcontainer for Codespaces prebuilds#54
DanWahlin merged 1 commit intomainfrom
devcontainer/prebuild-optimization

Conversation

@DanWahlin
Copy link
Copy Markdown
Collaborator

Moves install commands from postCreateCommand to onCreateCommand so they are cached during Codespaces prebuilds, reducing codespace startup time.

What changed

  • pip install pytest
  • npm install -g @github/copilot
  • gh extension install github/gh-copilot

These now run via onCreateCommand (cached in prebuild) instead of postCreateCommand (runs every launch).

Next step

Enable prebuilds in Settings → Codespaces → Prebuilds for the main branch.

Move install commands from postCreateCommand to onCreateCommand so they
are cached during prebuild, reducing codespace startup time.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 6, 2026 22:13
@DanWahlin DanWahlin merged commit 3b978bf into main Apr 6, 2026
5 checks passed
@DanWahlin DanWahlin deleted the devcontainer/prebuild-optimization branch April 6, 2026 22:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Optimizes Codespaces startup by moving tool installation steps into onCreateCommand so they can be captured by Codespaces prebuild snapshots.

Changes:

  • Replaced postCreateCommand with onCreateCommand for installing pytest, @github/copilot, and gh-copilot.
  • Kept postStartCommand as a lightweight readiness message shown on each start.
Show a summary per file
File Description
.devcontainer/devcontainer.json Moves dependency/tool installs to onCreateCommand to better align with Codespaces prebuild caching.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants