1
0
mirror of https://github.com/docker/docs.git synced 2026-10-23 18:09:02 +03:00

41 Commits

Author SHA1 Message Date
David Karlsson
2b12ac0ef8 build: vendor API reference data to speed up site builds (#26182)
API generation introduced in #26048 added roughly five minutes to site
builds: median successful main-branch build-workflow duration rose from
4m 05s to 8m 48s across September 3–25. The pre-build command took 4m
41s–4m 53s in each of four jobs on the merge commit.

Vendor the generated presentation model in `data/api-reference.json`,
mark it as generated, and let Docker, Netlify, and local Hugo builds
consume it directly. Keep the existing rendered-output checks.

Move generator tests, strict spec validation, and a byte-for-byte
regeneration check into `docker buildx bake validate-api-reference`,
inheriting the shared Docker base stage. The target uses the pinned
Vacuum release binary with Dockerfile ADD checksum verification and
archive extraction instead of compiling Vacuum from source. The existing
build workflow runs this target alongside the other validation matrix
entries. Only this matrix entry is advisory; its failures do not block
site builds or deployment.

Validated locally with the Docker target, rejection of deliberately
stale data, repeatable generation across directories, a production Hugo
build and verification of 453 API HTML/Markdown page pairs, workflow
syntax checks, and scoped documentation lint. The prebuilt-binary CI
check passed in 1m 40s, down from 5m 15s with source compilation. Remote
layer-cache settings were subsequently removed; local Go cache mounts
remain.

Generated by Codex
2026-09-25 18:45:09 +02:00
Craig Osterhout
1fe539c389 check for circular aliases (#25502)
<!--Delete sections as needed -->

## Description

Added check for circular aliases.

I've done it a few times. Move something and add an alias. Then move it
back and forget to remove the alias.

Currently there is a circular alias, so it should fail successfully.

## Related issues or tickets

<!-- Related issues, pull requests, or Jira tickets -->

## Reviews

<!-- Notes for reviewers here -->
<!-- List applicable reviews (optionally @tag reviewers) -->

- [ ] Editorial review

Signed-off-by: Craig Osterhout <craig.osterhout@docker.com>
2026-07-24 08:17:50 -07:00
David Karlsson
58403db11d hack/releaser: preserve query string on CloudFront redirects (#25393)
## Summary

The CloudFront redirect Lambda (`cloudfront-lambda-redirects.js`)
dropped the request query string when issuing 301 responses, so UTM tags
and other params were lost on redirected URLs. This appends the query
string to the `Location` header of both the exact-match and prefix
redirects (the directory/markdown rewrite branch already forwards the
request, so params survive there).

Adds unit tests (`node --test`, zero dependencies) that render the Go
template the same way `aws.go` does and exercise the handler. The tests
run in CI via a new `releaser-test` Dockerfile stage / bake target,
baked alongside `releaser-build` in the existing `releaser` job.

## Learnings

- The redirect Lambda source is a Go `text/template`
(`{{.RedirectsJSON}}` / `{{.RedirectsPrefixesJSON}}`), rendered and
zipped by `hack/releaser/aws.go`. To unit-test it, substitute the
placeholders the same way `aws.go` does, then evaluate the result as a
CommonJS module.
- `test-go-redirects` validates redirect *data* against the built
`public/` site, so it's the wrong host for a fast pure-JS test — the
`releaser` job, which already builds from `hack/releaser`, is the
natural home and has no Hugo dependency.

Generated by Claude Code

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-23 11:42:09 +02:00
David Karlsson
3a85e74d4f chore: fail on hugo warns and remove redundant validation
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2026-05-01 10:34:32 +02:00
David Karlsson
ef9b1061e1 ci: auto fix issues with cagent
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2025-12-19 13:21:20 +01:00
CrazyMax
ad14af69ba releaser: remove s3-config handling
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-10-22 14:14:20 +02:00
CrazyMax
04b56a67f9 run vale in docker
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-07-16 15:13:38 +02:00
CrazyMax
77ea1f9bc3 validate vendor target
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-12 11:32:59 +02:00
David Karlsson
c7511a228f refactor: move scripts and utils to hack/ directory
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-11-15 09:28:19 +01:00
David Karlsson
9ee4e85c70 releaser: add dry run mode
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-11-06 16:08:15 +01:00
David Karlsson
5b8ceb6a8f ci: use official Hugo image
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-10-16 17:26:46 +02:00
David Karlsson
83adeefaec ci: add check for duplicate target paths / aliases
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-08-13 08:27:54 +02:00
David Karlsson
61cdf6f1cc ci: add dockerfile check
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-08-13 08:27:54 +02:00
David Karlsson
dcd1ba4a33 bake: shared session for local context
With the latest Buildx, BuildKit, and Dockerfile, bake can detect when
multiple targets use the same local context, and deduplicate context
transfer.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-08-12 13:27:15 +02:00
David Karlsson
2da965fadf build: remove unused DOCS_ENFORCE_GIT_LOG_HISTORY var
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-07-09 17:41:11 +02:00
David Karlsson
140b8d0704 build: remove netlify _release
This build target was not being used for a long time

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-07-09 17:41:11 +02:00
David Karlsson
9cc209d4f2 build: disable provenance for build stages
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-07-09 17:41:11 +02:00
David Karlsson
6018f8551d build: deduplicate context transfers with bake
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-07-09 17:41:11 +02:00
David Karlsson
f58694d9d1 test: add check for validating go-redirects
Test ensures that:

- Go redirects are unique (this is actually enforced by YAML already
  because it requires keys to be unique, but just in case someone
  'echo >>'es into the file or whatever
- Go redirects always resolve to an index.html in the public output dir

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-06-27 13:45:30 +02:00
David Karlsson
31b91e00bb Merge pull request #19536 from dvdksn/ci-validate-upstream-missing-vardeclar
ci: UPSTREAM_COMMIT was never declared as a variable in bake
2024-06-24 08:28:31 +02:00
David Karlsson
97307d4c66 search: pagefind v1.1.0
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-05-23 14:05:59 +02:00
David Karlsson
761fa899e0 test: add build targets for unused media test
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-05-20 18:59:32 +02:00
David Karlsson
4b4698a4f3 test: remove pointless validation step
This validation was not caused in CI, and it can't really be in it's
current form, since the hugo_stats.json contains a lot of
false-positives, meaning that the file can easily become outdated
without it actually impacting anything.

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-05-20 15:41:23 +02:00
David Karlsson
9ea2034b6a Merge pull request #19561 from dvdksn/css-buildstats
hugo: use hugo buildStats to extract css classes and elements
2024-03-11 18:22:57 +01:00
David Karlsson
1d6505255c build: create makefile for vendoring
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-03-06 14:17:27 +01:00
David Karlsson
88975c2e57 hugo: use hugo buildStats to extract css
Improves build time compared to using tailwind content globs

Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-03-05 13:58:22 +01:00
David Karlsson
1b0297d0b2 ci: UPSTREAM_COMMIT was never declared as a variable in bake
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2024-02-29 10:04:37 +01:00
David Karlsson
ae5350af10 ci: fix validate-upstream workflow
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-10-16 17:25:10 +02:00
David Karlsson
9543cd0db5 chore: add vendor target for bake
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-23 16:23:00 +02:00
David Karlsson
a0d21ade2f migrate to hugo
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-08-22 09:41:02 +02:00
David Karlsson
2d44be0fc0 ci: replace htmlproofer with wjdp/htmltest
Signed-off-by: David Karlsson <david.karlsson@docker.com>
2023-04-12 15:38:51 +02:00
CrazyMax
4544982b55 jekyll(last_modified_at): fix for remote resources and data files (#15998)
* Dockerfile: add option to enforce git log history for local dev

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* jekyll(last_modified_at): do not override if already set with frontmatter

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* jekyll(last_modified_at): use data files for commands reference instead of stub file

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

* fix broken links

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
Co-authored-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-10-31 09:01:42 +01:00
CrazyMax
a0c0aec486 lab: move s3 redirects to lambda function
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-17 13:47:12 +02:00
CrazyMax
92948cbfd7 lab: cloudfront update with lambda edge function for redirects
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-08-17 13:47:12 +02:00
Justin Chadwell
0fb1ca91e6 ci: add annotations for mdl and htmlproofer
Add GitHub Actions annotations that will appear in the CI checks - this
should make it easier to see the reasons for the linting failures,
without needing to deep dive into the logs.
2022-08-03 09:58:01 +01:00
CrazyMax
614c4a7000 jekyll: enable sitemap and local search for dev environment
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-28 19:30:46 +02:00
CrazyMax
34051706b2 refactor and mutualize netlify and aws clients for deployment
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-07-18 13:56:58 +02:00
CrazyMax
9c296afa3e switch to ruby markdownlint and add ci validation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-25 12:17:09 +02:00
CrazyMax
b65866f2a6 jekyll: create plugin to fetch remote resources
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-18 18:20:31 +02:00
CrazyMax
8da7d9445d dockerfile: containerized htmlproofer
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-13 22:07:58 +02:00
CrazyMax
ebd36f7081 dockerfile: enhanced to match netlify pipeline
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
2022-05-13 22:07:57 +02:00