Skip to content

Commit 9ee4e97

Browse files
authored
Merge pull request #5 from ESIPFed/copilot/create-dev-container-config
Add Development Container configuration for GitHub Codespaces
2 parents 8fef9b0 + be416b4 commit 9ee4e97

3 files changed

Lines changed: 100 additions & 2 deletions

File tree

.devcontainer/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Development Container Configuration
2+
3+
This directory contains the configuration for the GitHub Codespaces development container.
4+
5+
## What's Included
6+
7+
This development container provides a complete environment for working with the AI Readiness Primer Quarto website:
8+
9+
- **Base Image**: R development environment (rocker-org/devcontainer/r-ver:4)
10+
- **Quarto CLI**: Latest version installed via dev container features
11+
- **VS Code Extensions**:
12+
- `quarto.quarto` - Official Quarto extension for VS Code
13+
- `ms-vscode.live-server` - Live server for quick previews
14+
- **Port Forwarding**: Automatic forwarding of port 4848 (Quarto preview server)
15+
- **Post-Create Check**: Runs `quarto check` to verify installation
16+
17+
## Using the Dev Container
18+
19+
### With GitHub Codespaces
20+
21+
1. Navigate to the repository on GitHub
22+
2. Click the "Code" button
23+
3. Select the "Codespaces" tab
24+
4. Click "Create codespace on main"
25+
26+
The container will automatically set up, and you'll be ready to work within a few minutes.
27+
28+
### With VS Code Locally
29+
30+
If you have Docker installed and the "Dev Containers" extension for VS Code:
31+
32+
1. Open the repository folder in VS Code
33+
2. Press `F1` and select "Dev Containers: Reopen in Container"
34+
3. Wait for the container to build and start
35+
36+
## Working with Quarto
37+
38+
Once your dev container is running, you can use standard Quarto commands:
39+
40+
```bash
41+
# Preview the site (accessible on forwarded port 4848)
42+
quarto preview
43+
44+
# Render the site
45+
quarto render
46+
47+
# Check Quarto installation
48+
quarto check
49+
```
50+
51+
The preview server will be automatically accessible through the forwarded port.

.devcontainer/devcontainer.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "AI Readiness Primer - Quarto Development",
3+
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4",
4+
5+
"features": {
6+
"ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {
7+
"version": "latest"
8+
}
9+
},
10+
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"quarto.quarto",
15+
"ms-vscode.live-server"
16+
],
17+
"settings": {
18+
"terminal.integrated.shell.linux": "/bin/bash"
19+
}
20+
}
21+
},
22+
23+
"forwardPorts": [4848],
24+
25+
"portsAttributes": {
26+
"4848": {
27+
"label": "Quarto Preview",
28+
"onAutoForward": "notify"
29+
}
30+
},
31+
32+
"postCreateCommand": "quarto check",
33+
34+
"remoteUser": "vscode"
35+
}

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,23 @@ The published site is available at: https://esipfed.github.io/ai-readiness-prime
1212

1313
## Local Development
1414

15-
### Prerequisites
15+
### Using GitHub Codespaces (Recommended)
16+
17+
The easiest way to get started is using GitHub Codespaces, which provides a pre-configured development environment:
18+
19+
1. Click the "Code" button on the repository page
20+
2. Select "Codespaces" tab
21+
3. Click "Create codespace on main"
22+
23+
The development container will automatically set up Quarto and all necessary tools. Once ready, you can use the terminal to run Quarto commands.
24+
25+
### Local Setup
26+
27+
#### Prerequisites
1628

1729
- [Quarto](https://quarto.org/docs/get-started/) installed on your system
1830

19-
### Building Locally
31+
#### Building Locally
2032

2133
To preview the site locally:
2234

0 commit comments

Comments
 (0)