Skip to content

Commit ef08485

Browse files
Merge branch 'main' into ENGDOCS-2281
2 parents 1d29f6c + 5ffcf87 commit ef08485

File tree

215 files changed

+1858
-1263
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+1858
-1263
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema
2+
name: New guide
3+
description: Propose a new guide for Docker docs
4+
labels:
5+
- area/guides
6+
- kind/proposal
7+
8+
body:
9+
- type: textarea
10+
attributes:
11+
label: Description
12+
description: |
13+
Briefly describe the topic that you would like us to cover.
14+
validations:
15+
required: true
16+
- type: checkboxes
17+
attributes:
18+
label: Would you like to contribute this guide?
19+
description: |
20+
If you select this checkbox, you indicate that you're willing to
21+
contribute this guide. If not, we will treat this issue as a request,
22+
and someone (a Docker employee, Docker captain, or community member)
23+
may pick it up and start working on it.
24+
options:
25+
- label: Yes

.github/labeler.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,11 @@ area/accounts:
159159
- any-glob-to-any-file:
160160
- content/manuals/accounts/**
161161

162+
area/copilot:
163+
- changed-files:
164+
- any-glob-to-any-file:
165+
- content/manuals/copilot/**
166+
162167
hugo:
163168
- changed-files:
164169
- any-glob-to-any-file:

.github/workflows/build.yml

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,30 @@ permissions:
1515
contents: read # to fetch code (actions/checkout)
1616

1717
jobs:
18+
releaser:
19+
runs-on: ubuntu-24.04
20+
steps:
21+
-
22+
name: Checkout
23+
uses: actions/checkout@v4
24+
-
25+
name: Set up Docker Buildx
26+
uses: docker/setup-buildx-action@v3
27+
-
28+
name: Build
29+
uses: docker/bake-action@v5
30+
with:
31+
files: |
32+
docker-bake.hcl
33+
targets: releaser-build
34+
set: |
35+
*.cache-from=type=gha,scope=releaser
36+
*.cache-to=type=gha,scope=releaser,mode=max
37+
1838
build:
1939
runs-on: ubuntu-24.04
40+
needs:
41+
- releaser
2042
steps:
2143
-
2244
name: Checkout
@@ -34,6 +56,16 @@ jobs:
3456
set: |
3557
*.cache-from=type=gha,scope=build
3658
*.cache-to=type=gha,scope=build,mode=max
59+
-
60+
name: Check Cloudfront config
61+
uses: docker/bake-action@v5
62+
with:
63+
targets: aws-cloudfront-update
64+
env:
65+
DRY_RUN: true
66+
AWS_REGION: us-east-1
67+
AWS_CLOUDFRONT_ID: 0123456789ABCD
68+
AWS_LAMBDA_FUNCTION: DockerDocsRedirectFunction-dummy
3769

3870
vale:
3971
if: ${{ github.event_name == 'pull_request' }}
@@ -76,25 +108,3 @@ jobs:
76108
*.cache-to=type=gha,scope=validate-${{ matrix.target }},mode=max
77109
*.cache-from=type=gha,scope=validate-${{ matrix.target }}
78110
*.cache-from=type=gha,scope=build
79-
80-
# build-releaser builds the _releaser used for AWS deployment in publish workflow.
81-
# It's just to be sure it builds correctly.
82-
build-releaser:
83-
runs-on: ubuntu-24.04
84-
steps:
85-
-
86-
name: Checkout
87-
uses: actions/checkout@v4
88-
-
89-
name: Set up Docker Buildx
90-
uses: docker/setup-buildx-action@v3
91-
-
92-
name: Build
93-
uses: docker/bake-action@v5
94-
with:
95-
files: |
96-
docker-bake.hcl
97-
targets: releaser-build
98-
set: |
99-
*.cache-from=type=gha,scope=releaser
100-
*.cache-to=type=gha,scope=releaser,mode=max

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
ARG ALPINE_VERSION=3.20
55
ARG GO_VERSION=1.23
66
ARG HTMLTEST_VERSION=0.17.0
7-
ARG HUGO_VERSION=0.136.5
7+
ARG HUGO_VERSION=0.138.0
88
ARG NODE_VERSION=22
99
ARG PAGEFIND_VERSION=1.1.1
1010

_releaser/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ARG GO_VERSION=1.19
55
FROM scratch AS sitedir
66

77
FROM golang:${GO_VERSION}-alpine AS base
8-
RUN apk add --no-cache jq openssl
8+
RUN apk add --no-cache openssl
99
ENV CGO_ENABLED=0
1010
WORKDIR /src
1111
COPY go.mod go.sum ./
@@ -19,6 +19,7 @@ RUN --mount=type=bind,target=. \
1919
go build -o /out/releaser .
2020

2121
FROM base AS aws-s3-update-config
22+
ARG DRY_RUN=false
2223
ARG AWS_REGION
2324
ARG AWS_S3_BUCKET
2425
ARG AWS_S3_CONFIG
@@ -30,6 +31,7 @@ RUN --mount=type=bind,target=. \
3031
releaser aws s3-update-config
3132

3233
FROM base AS aws-lambda-invoke
34+
ARG DRY_RUN=false
3335
ARG AWS_REGION
3436
ARG AWS_LAMBDA_FUNCTION
3537
RUN --mount=type=bind,from=releaser,source=/out/releaser,target=/usr/bin/releaser \
@@ -39,16 +41,17 @@ RUN --mount=type=bind,from=releaser,source=/out/releaser,target=/usr/bin/release
3941
releaser aws lambda-invoke
4042

4143
FROM base AS aws-cloudfront-update
44+
ARG DRY_RUN=false
4245
ARG AWS_REGION
4346
ARG AWS_LAMBDA_FUNCTION
4447
ARG AWS_CLOUDFRONT_ID
48+
ARG AWS_LAMBDA_FUNCTION_FILE="cloudfront-lambda-redirects.js"
49+
ARG REDIRECTS_FILE="/site/redirects.json"
50+
ARG REDIRECTS_PREFIXES_FILE="redirects-prefixes.json"
4551
RUN --mount=type=bind,target=. \
4652
--mount=type=bind,from=sitedir,target=/site \
4753
--mount=type=bind,from=releaser,source=/out/releaser,target=/usr/bin/releaser \
4854
--mount=type=secret,id=AWS_ACCESS_KEY_ID \
4955
--mount=type=secret,id=AWS_SECRET_ACCESS_KEY \
5056
--mount=type=secret,id=AWS_SESSION_TOKEN \
51-
AWS_LAMBDA_FUNCTION_FILE=cloudfront-lambda-redirects.js \
52-
REDIRECTS_JSON=$(jq -c '.' /site/redirects.json) \
53-
REDIRECTS_PREFIXES_JSON=$(jq -c '.' redirects-prefixes.json) \
5457
releaser aws cloudfront-update

_releaser/aws.go

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ type AwsS3UpdateConfigCmd struct {
3030
Region string `kong:"name='region',env='AWS_REGION'"`
3131
S3Bucket string `kong:"name='s3-bucket',env='AWS_S3_BUCKET'"`
3232
S3Config string `kong:"name='s3-website-config',env='AWS_S3_CONFIG'"`
33+
DryRun bool `kong:"name='dry-run',env='DRY_RUN'"`
3334
}
3435

3536
func (s *AwsS3UpdateConfigCmd) Run() error {
37+
if s.DryRun {
38+
log.Printf("INFO: Dry run mode enabled. Configuration:\nRegion: %s\nS3Bucket: %s\nS3Config: %s\n", s.Region, s.S3Bucket, s.S3Config)
39+
return nil
40+
}
41+
3642
file, err := os.ReadFile(s.S3Config)
3743
if err != nil {
3844
return fmt.Errorf("failed to read s3 config file %s: %w", s.S3Config, err)
@@ -74,9 +80,15 @@ func (s *AwsS3UpdateConfigCmd) Run() error {
7480
type AwsLambdaInvokeCmd struct {
7581
Region string `kong:"name='region',env='AWS_REGION'"`
7682
LambdaFunction string `kong:"name='lambda-function',env='AWS_LAMBDA_FUNCTION'"`
83+
DryRun bool `kong:"name='dry-run',env='DRY_RUN'"`
7784
}
7885

7986
func (s *AwsLambdaInvokeCmd) Run() error {
87+
if s.DryRun {
88+
log.Printf("INFO: Dry run mode enabled. Configuration:\nRegion: %s\nLambdaFunction: %s\n", s.Region, s.LambdaFunction)
89+
return nil
90+
}
91+
8092
svc := lambda.New(session.Must(session.NewSessionWithOptions(session.Options{
8193
SharedConfigState: session.SharedConfigEnable,
8294
})), &aws.Config{
@@ -100,19 +112,26 @@ type AwsCloudfrontUpdateCmd struct {
100112
Function string `kong:"name='lambda-function',env='AWS_LAMBDA_FUNCTION'"`
101113
FunctionFile string `kong:"name='lambda-function-file',env='AWS_LAMBDA_FUNCTION_FILE'"`
102114
CloudfrontID string `kong:"name='cloudfront-id',env='AWS_CLOUDFRONT_ID'"`
103-
RedirectsJSON string `kong:"name='redirects-json',env='REDIRECTS_JSON'"`
104-
RedirectsPrefixesJSON string `kong:"name='redirects-prefixes-json',env='REDIRECTS_PREFIXES_JSON'"`
115+
RedirectsFile string `kong:"name='redirects-file',env='REDIRECTS_FILE'"`
116+
RedirectsPrefixesFile string `kong:"name='redirects-prefixes-file',env='REDIRECTS_PREFIXES_FILE'"`
117+
DryRun bool `kong:"name='dry-run',env='DRY_RUN'"`
105118
}
106119

107120
func (s *AwsCloudfrontUpdateCmd) Run() error {
108121
var err error
109122
ver := time.Now().UTC().Format(time.RFC3339)
110123

111-
zipdt, err := getLambdaFunctionZip(s.FunctionFile, s.RedirectsJSON, s.RedirectsPrefixesJSON)
124+
zipdt, err := getLambdaFunctionZip(s.FunctionFile, s.RedirectsFile, s.RedirectsPrefixesFile, s.DryRun)
112125
if err != nil {
113126
return fmt.Errorf("cannot create lambda function zip: %w", err)
114127
}
115128

129+
if s.DryRun {
130+
log.Printf("INFO: Dry run mode enabled. Configuration:\nRegion: %s\nFunction: %s\nFunctionFile: %s\nCloudfrontID: %s\nRedirectsFile: %s\nRedirectsPrefixesFile: %s\n",
131+
s.Region, s.Function, s.FunctionFile, s.CloudfrontID, s.RedirectsFile, s.RedirectsPrefixesFile)
132+
return nil
133+
}
134+
116135
svc := lambda.New(session.Must(session.NewSessionWithOptions(session.Options{
117136
SharedConfigState: session.SharedConfigEnable,
118137
})), &aws.Config{
@@ -228,24 +247,39 @@ func (s *AwsCloudfrontUpdateCmd) Run() error {
228247
return nil
229248
}
230249

231-
func getLambdaFunctionZip(funcFilename string, redirectsJSON string, redirectsPrefixesJSON string) ([]byte, error) {
250+
func getLambdaFunctionZip(funcFilename, redirectsFile, redirectsPrefixesFile string, dryrun bool) ([]byte, error) {
232251
funcdt, err := os.ReadFile(funcFilename)
233252
if err != nil {
234253
return nil, fmt.Errorf("failed to read lambda function file %q: %w", funcFilename, err)
235254
}
236255

256+
redirects, err := os.ReadFile(redirectsFile)
257+
if err != nil {
258+
return nil, fmt.Errorf("failed to read redirects file %q: %w", redirectsFile, err)
259+
}
260+
261+
redirectsPrefixes, err := os.ReadFile(redirectsPrefixesFile)
262+
if err != nil {
263+
return nil, fmt.Errorf("failed to read redirects prefixes file %q: %w", redirectsPrefixesFile, err)
264+
}
265+
237266
var funcbuf bytes.Buffer
238267
functpl := template.Must(template.New("").Parse(string(funcdt)))
239268
if err = functpl.Execute(&funcbuf, struct {
240269
RedirectsJSON string
241270
RedirectsPrefixesJSON string
242271
}{
243-
redirectsJSON,
244-
redirectsPrefixesJSON,
272+
string(redirects),
273+
string(redirectsPrefixes),
245274
}); err != nil {
246275
return nil, err
247276
}
248277

278+
if dryrun {
279+
log.Printf("INFO: Dry run mode enabled. Lambda Function Definition:\n\n%s\n", funcbuf.String())
280+
return nil, nil
281+
}
282+
249283
tmpdir, err := os.MkdirTemp("", "lambda-zip")
250284
if err != nil {
251285
return nil, err

_vale/config/vocabularies/Docker/accept.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ Jamf
7676
JFrog
7777
JetBrains
7878
Kerberos
79+
[Kk]eyrings?
7980
Kitematic
8081
Kubernetes
8182
LTS
@@ -99,6 +100,7 @@ OCI
99100
OTel
100101
Okta
101102
PAT
103+
PEM
102104
Postgres
103105
PowerShell
104106
Python
@@ -136,10 +138,12 @@ Unix
136138
VLAN
137139
VM
138140
VMware
141+
VPN
139142
WSL
140143
Wasm
141144
Windows
142145
WireMock
146+
Zscaler
143147
Zsh
144148
[Bb]uildx
145149
[Cc]odenames?

_vendor/github.com/docker/cli/docs/reference/run.md

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_vendor/github.com/docker/scout-cli/docs/docker_scout_sbom.yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

_vendor/github.com/docker/scout-cli/docs/scout_cves.md

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)