Skip to content

Commit b0cbe21

Browse files
committed
Add devcontainer configuration
Signed-off-by: Erik Godding Boye <egboye@gmail.com>
1 parent c1d0d53 commit b0cbe21

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "cert-manager Website Dev",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node:22",
4+
5+
"postCreateCommand": "npm ci && npm install -g netlify-cli",
6+
7+
"forwardPorts": [3000],
8+
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"dbaeumer.vscode-eslint",
13+
"esbenp.prettier-vscode",
14+
"yzhang.markdown-all-in-one"
15+
]
16+
}
17+
}
18+
}

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,22 @@ npm ci
141141

142142
This command is similar to `npm install` but it ensures that you will have a clean install of all the dependencies.
143143

144+
### Devcontainer (optional)
145+
146+
The repository includes a ready-to-use **devcontainer** for VS Code Dev Containers or GitHub Codespaces.
147+
This provides a fully configured development environment with all required tools and dependencies,
148+
so you can start working on the website without installing anything on your local machine.
149+
150+
**Usage:**
151+
152+
1. Open the repository in VS Code.
153+
2. When prompted, select **"Reopen in Container"** (or run **Dev Containers: Reopen in Container** from the command palette).
154+
3. Once the container is built, use the integrated terminal to run:
155+
156+
```bash
157+
./scripts/server # start the local development server
158+
./scripts/verify # run lint, link-check, spell-check, etc.
159+
144160
### Development Server
145161

146162
The best development environment uses the Netlify CLI to serve the site locally. The Netlify CLI server

0 commit comments

Comments
 (0)