Skip to content

Commit a6fe846

Browse files
authored
Merge branch 'docker:main' into main
2 parents 0208914 + 069012f commit a6fe846

111 files changed

Lines changed: 42100 additions & 586 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 45 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,44 @@
11
---
22
name: create-lab-guide
3-
description: >
4-
Create a guide page for a Labspace. This includes writing the markdown content for the guide,
5-
structuring it according to Docker docs conventions, and ensuring it provides clear instructions
6-
and information about the Labspace. Includes learning about the lab itself, extracting out its
7-
learning objectives, and combining all of that into a well-structured guide markdown file.
3+
description: "Clone a dockersamples Labspace repo, extract learning objectives and module structure from labspace.yaml, and produce a Hugo guide page under content/guides/ with correct frontmatter, labspace-launch shortcode, and Docker docs style compliance. Use when asked to create a lab guide, write a Labspace page, add a Docker lab tutorial, migrate a lab to docs, or document a hands-on lab."
84
---
95

106
# Create Lab Guide
117

12-
You are creating a new guide page for a labspace. The guide should be structured according to Docker docs conventions,
13-
with clear sections, learning objectives, and instructions for users to get the most out of the lab.
8+
Create a guide page for a Docker Labspace: clone the source repo, extract
9+
structure from `labspace.yaml`, write the Hugo markdown page, and validate.
1410

1511
## Inputs
1612

17-
The user provides one or more guides to migrate. Resolve these from the inventory below:
18-
1913
- **REPO_NAME**: GitHub repo in the `dockersamples` org (e.g. `labspace-ai-fundamentals`)
2014

2115
## Step 1: Clone the labspace repo
2216

23-
Clone the guide repo to a temporary directory. This gives you all source files locally — no HTTP calls needed.
24-
2517
```bash
26-
git clone --depth 1 https://github.com/dockersamples/{REPO_NAME}.git <tmpdir>/{REPO_NAME}
18+
TMPDIR=$(mktemp -d)
19+
git clone --depth 1 https://github.com/dockersamples/{REPO_NAME}.git "$TMPDIR/{REPO_NAME}"
2720
```
2821

29-
Where `<tmpdir>` is a temporary directory on your system (e.g. the output of `mktemp -d`).
30-
31-
## Step 2: Learn and extract key information about the lab
32-
33-
The repo structure is:
22+
## Step 2: Extract key information
3423

35-
- `<tmpdir>/{REPO_NAME}/README.md` — the main README for the lab
36-
- `<tmpdir>/{REPO_NAME}/labspace/labspace.yaml` — a YAML document outlining details of the lab, including the sections/modules and the path to their content
37-
- `<tmpdir>/{REPO_NAME}/labspace/*.md` — the content for each section/module (only reference the files specified in `labspace.yaml`)
38-
- `<tmpdir>/{REPO_NAME}/.github/workflows/` — the GHA workflow that publishes the labspace. It includes the repo URL for the published Compose file, which will be useful for the "launch" command
39-
- `<tmpdir>/{REPO_NAME}/compose.override.yaml` - lab-specific Compose customizations
24+
Read these files from the cloned repo:
4025

41-
1. Read `README.md` to understand the purpose of the lab.
42-
2. Read the `labspace/labspace.yaml` to understand the structure of the lab and its sections/modules.
43-
3. Read the `labspace/*.md` files to extract the learning objectives, instructions, and any code snippets.
44-
4. Extract a short description that can be used for the `description` and `summary` fields in the guide markdown.
45-
5. Determine if a model will be pulled when starting the lab by looking at the `compose.override.yaml` file and looking for the any top-level `model` specifications.
26+
| File | Purpose |
27+
|------|---------|
28+
| `README.md` | Lab purpose and overview |
29+
| `labspace/labspace.yaml` | Module structure and content paths |
30+
| `labspace/*.md` | Module content (only files listed in `labspace.yaml`) |
31+
| `.github/workflows/*.yml` | Published Compose file URL for the launch command |
32+
| `compose.override.yaml` | Check for top-level `model` specs (triggers `model-download` param) |
4633

34+
Extract:
35+
1. A short description for the `description` and `summary` frontmatter fields.
36+
2. Learning objectives from the module content.
37+
3. Whether a model download is required (`compose.override.yaml` → top-level `model` key).
4738

48-
## Step 2: Write the guide markdown
39+
## Step 3: Write the guide markdown
4940

50-
The markdown file must be located in the `guides/` directory and have a filename of `lab-{GUIDE_ID}.md`.
51-
52-
Sample markdown structure, including frontmatter and content:
41+
Place the file at `content/guides/lab-{GUIDE_ID}.md`.
5342

5443
```markdown
5544
---
@@ -60,7 +49,7 @@ description: |
6049
summary: |
6150
A short summary of the lab for the guides listing page. 2-3 lines.
6251
keywords: AI, Docker, Model Runner, agentic apps, lab, labspace
63-
aliases: # Include if the lab is an AI-related lab
52+
aliases: # Include only for AI-related labs
6453
- /labs/docker-for-ai/{REPO_NAME_WITHOUT_LABSPACE_PREFIX}/
6554
params:
6655
tags: [ai, labs]
@@ -85,7 +74,6 @@ By the end of this Labspace, you will have completed the following:
8574
- Objective #1
8675
- Objective #2
8776
- Objective #3
88-
- Objective #4
8977

9078
## Modules
9179

@@ -94,33 +82,35 @@ By the end of this Labspace, you will have completed the following:
9482
| 1 | Module #1 | Description of module #1 |
9583
| 2 | Module #2 | Description of module #2 |
9684
| 3 | Module #3 | Description of module #3 |
97-
| 4 | Module #4 | Description of module #4 |
98-
| 5 | Module #5 | Description of module #5 |
99-
| 6 | Module #6 | Description of module #6 |
10085
```
10186

102-
Important notes:
87+
Conditional rules:
88+
- All lab guides **must** include `labs` in `params.tags`.
89+
- AI-related labs: also add `ai` tag and an alias under `/labs/docker-for-ai/`.
90+
- If a model download is required: add `model-download: true` to the `labspace-launch` shortcode.
91+
92+
## Step 4: Apply Docker docs style rules
93+
94+
Follow STYLE.md and COMPONENTS.md. Key rules:
10395

104-
- The learning objectives should be based on the content of the labspace as a whole.
105-
- The modules should be based on the sections/modules outlined in `labspace.yaml`.
106-
- All lab guides _must_ have a tag of `labs`
107-
- If the lab is AI-related, it should also have a tag of `ai` and aliases for `/labs/docker-for-ai/{REPO_NAME}/`
108-
- If the lab pulls a model, add a `model-download: true` parameter to the `labspace-launch` shortcode to show a warning about model downloads.
96+
| Avoid | Use instead |
97+
|-------|-------------|
98+
| "we", "let's" | Imperative voice or "you" |
99+
| "simply", "easily", "just" | Remove the hedge word |
100+
| "allows you to" / "enables you to" | "lets you" or rephrase |
101+
| "click" | "select" |
102+
| Bold for emphasis / product names | Bold only for UI elements |
103+
| "currently", "new", "recently" | Remove time-relative language |
109104

105+
Use `console` as the language hint for shell blocks with `$` prompts.
106+
Use contractions ("it's", "you're", "don't").
110107

111-
## Step 3: Apply Docker docs style rules
108+
## Step 5: Validate
112109

113-
These are mandatory (from STYLE.md and AGENTS.md):
110+
1. Confirm frontmatter has `title`, `description`, `keywords`, and `params.tags` including `labs`.
111+
2. Run `npx prettier --write <file>` to format.
112+
3. Run `docker buildx bake lint vale` and fix any errors.
113+
4. Re-read the file and verify: correct shortcode syntax, objectives match source content, modules match `labspace.yaml`, no vendored paths edited.
114114

115-
- **No "we"**: "We are going to create" → "Create" or "Start by creating"
116-
- **No "let us" / "let's"**: → imperative voice or "You can..."
117-
- **No hedge words**: remove "simply", "easily", "just", "seamlessly"
118-
- **No meta-commentary**: remove "it's worth noting", "it's important to understand"
119-
- **No "allows you to" / "enables you to"**: → "lets you" or rephrase
120-
- **No "click"**: → "select"
121-
- **No bold for emphasis or product names**: only bold UI elements
122-
- **No time-relative language**: remove "currently", "new", "recently", "now"
123-
- **No exclamations**: remove "Voila!!!" etc.
124-
- Use `console` language hint for interactive shell blocks with `$` prompts
125-
- Use contractions: "it's", "you're", "don't"
115+
Do not proceed to commit until validation passes.
126116

.agents/skills/write/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Prettier runs automatically after each edit via the PostToolUse hook.
4545
Run lint manually after all edits are complete:
4646

4747
```bash
48-
${CLAUDE_SKILL_DIR}/scripts/lint.sh <changed-files>
48+
scripts/lint.sh <changed-files>
4949
```
5050

5151
The lint script runs markdownlint and vale on only the files you pass it,

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
-
6969
name: Configure AWS Credentials
7070
if: ${{ env.DOCS_AWS_IAM_ROLE != '' }}
71-
uses: aws-actions/configure-aws-credentials@61815dcd50bd041e203e49132bacad1fd04d2708 # v5
71+
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6.1.1
7272
with:
7373
role-to-assume: ${{ env.DOCS_AWS_IAM_ROLE }}
7474
aws-region: ${{ env.DOCS_AWS_REGION }}

.github/workflows/labeler.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ concurrency:
55
cancel-in-progress: true
66

77
on:
8-
workflow_dispatch:
8+
pull_request_target:
99

1010
jobs:
1111
labeler:
@@ -16,4 +16,4 @@ jobs:
1616
steps:
1717
-
1818
name: Run
19-
uses: actions/labeler@634933edcd8ababfe52f92936142cc22ac488b1b # v6.0.1
19+
uses: actions/labeler@f27b608878404679385c85cfa523b85ccb86e213 # v6.1.0

.github/workflows/nightly-docs-scan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Configure AWS credentials
5151
id: aws-credentials
5252
continue-on-error: true
53-
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4
53+
uses: aws-actions/configure-aws-credentials@d979d5b3a71173a29b74b5b88418bfda9437d885 # v6.1.1
5454
with:
5555
role-to-assume: arn:aws:iam::710015040892:role/docker-agent-action-20260409141318957000000001
5656
aws-region: us-east-1
@@ -66,7 +66,7 @@ jobs:
6666
echo "GITHUB_APP_TOKEN=$PAT" >> "$GITHUB_ENV"
6767
6868
- name: Run documentation scan
69-
uses: docker/cagent-action@0498757af1c50b084f763d626f571918cf317509 # latest
69+
uses: docker/cagent-action@f208610469d69f20983cad64c577949a132caa33 # v1.5.3
7070
env:
7171
GH_TOKEN: ${{ env.GITHUB_APP_TOKEN || github.token }}
7272
with:

.github/workflows/notify-release-notes-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
echo "author=$(jq -r .author pr-details.json)" >> "$GITHUB_OUTPUT"
2626
2727
- name: Notify Slack
28-
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
28+
uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3
2929
with:
3030
method: chat.postMessage
3131
token: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/pr-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
if: |
1515
github.event_name == 'issue_comment' ||
1616
github.event.workflow_run.conclusion == 'success'
17-
uses: docker/cagent-action/.github/workflows/review-pr.yml@c22076b8856ee12d9b4c4685bb49cf26eb974079 # v1.5.0
17+
uses: docker/cagent-action/.github/workflows/review-pr.yml@f208610469d69f20983cad64c577949a132caa33 # v1.5.3
1818
# Scoped to the job so other jobs in this workflow aren't over-permissioned
1919
permissions:
2020
contents: read # Read repository files and PR diffs

.vale.ini

Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,34 @@ MinAlertLevel = suggestion
33
IgnoredScopes = text.frontmatter, code, tt, b, strong, i, a
44
Vocab = Docker
55

6-
# Disable rules for genered content
7-
[content/reference/**/**.md]
8-
Vale.Spelling = NO
9-
Vale.Terms = NO
6+
# Generated reference content — disable rules that don't apply
7+
[content/reference/**]
108
Docker.Capitalization = NO
11-
12-
[content/manuals/*/release-notes/*.md]
139
Vale.Spelling = NO
1410
Vale.Terms = NO
15-
Docker.Capitalization = NO
16-
Docker.We = NO
1711

18-
[content/manuals/*/release-notes.md]
19-
Vale.Spelling = NO
20-
Vale.Terms = NO
21-
Docker.Capitalization = NO
22-
Docker.We = NO
23-
24-
[content/contribute/*.md]
25-
Vale.Spelling = NO
26-
Vale.Terms = NO
12+
# Skip release notes and old desktop changelog content entirely
13+
[{content/manuals/*/release-notes.md,content/manuals/*/release-notes/**,content/manuals/desktop/previous-versions/**}]
14+
Docker.Avoid = NO
2715
Docker.Capitalization = NO
2816
Docker.Exclamation = NO
29-
30-
[content/manuals/desktop/previous-versions/*.md]
17+
Docker.Forbidden = NO
18+
Docker.GenericCTA = NO
19+
Docker.HeadingPunctuation = NO
20+
Docker.ListComma = NO
21+
Docker.OxfordComma = NO
22+
Docker.RecommendedWords = NO
23+
Docker.Spacing = NO
24+
Docker.Terms = NO
25+
Docker.URLFormat = NO
26+
Docker.Units = NO
27+
Docker.VersionText = NO
28+
Docker.We = NO
3129
Vale.Spelling = NO
30+
Vale.Repetition = NO
3231
Vale.Terms = NO
33-
Docker.Capitalization = NO
34-
Docker.Exclamation = NO
3532

3633
[*.md]
37-
BasedOnStyles = Vale, Docker
38-
# Exclude `{{< ... >}}`, `{{% ... %}}`, [Who]({{< ... >}})
39-
TokenIgnores = ({{[%<] .* [%>]}}.*?{{[%<] ?/.* [%>]}}), \
40-
(\[.+\]\({{< .+ >}}\)), \
41-
[^\S\r\n]({{[%<] \w+ .+ [%>]}})\s, \
42-
[^\S\r\n]({{[%<](?:/\*) .* (?:\*/)[%>]}})\s, \
43-
(?sm)({{[%<] .*?\s[%>]}})
44-
45-
# Exclude `{{< myshortcode `This is some <b>HTML</b>, ... >}}`
46-
BlockIgnores = (?sm)^({{[%<] \w+ [^{]*?\s[%>]}})\n$, \
47-
(?s) *({{< highlight [^>]* ?>}}.*?{{< ?/ ?highlight >}})
34+
BasedOnStyles = Docker, Vale
35+
TokenIgnores = ({{[^}]+}}\S*)
36+
BlockIgnores = (?m)^[ \t]*({{[^}]+}})[ \t]*$, (\[[^\]]*{{[^}]+}}[^\]]*\]\([^)]*\))

AGENTS.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,25 @@ introduced, which is permanently true.
8080

8181
- Use lowercase "config" in prose — `vale.Terms` flags a capital-C "Config"
8282

83+
### Updating the vocabulary
84+
85+
If Vale flags a legitimate tech term, product name, or compound identifier
86+
as a misspelling, add it to `_vale/config/vocabularies/Docker/accept.txt`.
87+
This is optional — only update when a real new term is missing, not to
88+
silence individual violations.
89+
90+
- Use the canonical form for case-sensitive product names (`PyTorch`,
91+
`GitHub`, `Kubernetes`, `BuildKit`). `Vale.Terms` enforces that exact
92+
case across the docs.
93+
- Use `[Aa]bcd` character-class regex for words that legitimately appear
94+
in multiple cases (e.g., sentence-starting capitalization, or a name
95+
that's also a generic noun). This covers spelling without enforcing
96+
a single canonical form.
97+
- Avoid broad regex patterns — entries that match many words at once
98+
(especially with `(?i)`) suppress other rule checks on every match.
99+
- Don't add a wrong-cased entry to silence one false positive — it
100+
cascades into `Vale.Terms` violations on every correct usage.
101+
83102
## Alpine.js patterns
84103

85104
Do not combine Alpine's `x-show` with the HTML `hidden` attribute on the
@@ -111,12 +130,17 @@ produces broken HTML — always check COMPONENTS.md for correct syntax.
111130

112131
```sh
113132
npx prettier --write <file> # Format before committing
133+
scripts/lint.sh <file>... # Lint specific files (markdownlint + vale)
114134
docker buildx bake validate # Run all validation checks
115135
docker buildx bake lint # Markdown linting only
116136
docker buildx bake vale # Style guide checks only
117137
docker buildx bake test # HTML and link checking
118138
```
119139

140+
For incremental work, prefer `scripts/lint.sh` over the `bake` targets —
141+
it runs the same checks on just the files you pass, so the output stays
142+
scoped to your changes instead of the whole repo.
143+
120144
### Validation in git worktrees
121145

122146
`docker buildx bake validate` fails in git worktrees because Hugo cannot
@@ -128,9 +152,14 @@ and `validate-vendor` targets run correctly in CI.
128152

129153
1. Make changes
130154
2. Format with prettier: `npx prettier --write <file>`
131-
3. Run `docker buildx bake lint vale`
155+
3. Lint the changed files: `scripts/lint.sh <file>...`
132156
4. Run a full build with `docker buildx bake` (optional for small changes)
133157

158+
Always lint the specific files you changed before committing. Use
159+
`scripts/lint.sh` rather than the `bake` targets so the output is scoped
160+
to your changes — bake runs across the entire repo and the noise makes
161+
real issues easy to miss.
162+
134163
## Git hygiene
135164

136165
- **Stage files explicitly.** Never use `git add .` / `git add -A` /

_vale/Docker/Capitalization.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ action:
77
params:
88
- Docker
99
tokens:
10-
- '[^\[/]docker[^/]'
10+
- '[^\[/\-.]docker[^/\-.\w]'

0 commit comments

Comments
 (0)