Skip to content

Commit a9d3b98

Browse files
authored
Merge pull request #21336 from docker/published-update
publish updates from main
2 parents a196ee8 + b6abee8 commit a9d3b98

File tree

83 files changed

+325
-356
lines changed

Some content is hidden

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

83 files changed

+325
-356
lines changed

_releaser/Dockerfile

Lines changed: 3 additions & 3 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 ./
@@ -49,6 +49,6 @@ RUN --mount=type=bind,target=. \
4949
--mount=type=secret,id=AWS_SECRET_ACCESS_KEY \
5050
--mount=type=secret,id=AWS_SESSION_TOKEN \
5151
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) \
52+
REDIRECTS_FILE="/site/redirects.json" \
53+
REDIRECTS_PREFIXES_FILE="redirects-prefixes.json" \
5454
releaser aws cloudfront-update

_releaser/aws.go

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,17 @@ func (s *AwsLambdaInvokeCmd) Run() error {
9898
type AwsCloudfrontUpdateCmd struct {
9999
Region string `kong:"name='region',env='AWS_REGION'"`
100100
Function string `kong:"name='lambda-function',env='AWS_LAMBDA_FUNCTION'"`
101-
FunctionFile string `kong:"name='lambda-function-file',env='AWS_LAMBDA_FUNCTION_FILE'"`
101+
FunctionFile string `kong:"name='lambda-function-file',env='AWS_LAMBDA_FUNCTION_FILE',type=filecontent"`
102102
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'"`
103+
RedirectsFile string `kong:"name='redirects-file',env='REDIRECTS_FILE',type=filecontent"`
104+
RedirectsPrefixesFile string `kong:"name='redirects-prefixes-file',env='REDIRECTS_PREFIXES_FILE',type=filecontent"`
105105
}
106106

107107
func (s *AwsCloudfrontUpdateCmd) Run() error {
108108
var err error
109109
ver := time.Now().UTC().Format(time.RFC3339)
110110

111-
zipdt, err := getLambdaFunctionZip(s.FunctionFile, s.RedirectsJSON, s.RedirectsPrefixesJSON)
111+
zipdt, err := getLambdaFunctionZip(s.FunctionFile, s.RedirectsFile, s.RedirectsPrefixesFile)
112112
if err != nil {
113113
return fmt.Errorf("cannot create lambda function zip: %w", err)
114114
}
@@ -228,20 +228,15 @@ func (s *AwsCloudfrontUpdateCmd) Run() error {
228228
return nil
229229
}
230230

231-
func getLambdaFunctionZip(funcFilename string, redirectsJSON string, redirectsPrefixesJSON string) ([]byte, error) {
232-
funcdt, err := os.ReadFile(funcFilename)
233-
if err != nil {
234-
return nil, fmt.Errorf("failed to read lambda function file %q: %w", funcFilename, err)
235-
}
236-
231+
func getLambdaFunctionZip(funcdt, redirects, redirectsPrefixes string) ([]byte, error) {
237232
var funcbuf bytes.Buffer
238-
functpl := template.Must(template.New("").Parse(string(funcdt)))
239-
if err = functpl.Execute(&funcbuf, struct {
233+
functpl := template.Must(template.New("").Parse(funcdt))
234+
if err := functpl.Execute(&funcbuf, struct {
240235
RedirectsJSON string
241236
RedirectsPrefixesJSON string
242237
}{
243-
redirectsJSON,
244-
redirectsPrefixesJSON,
238+
redirects,
239+
redirectsPrefixes,
245240
}); err != nil {
246241
return nil, err
247242
}

content/get-started/get-docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ section and choose the best installation path for you.
3434
{{< card
3535
title="Docker Desktop for Mac"
3636
description="A native application using the macOS sandbox security model that delivers all Docker tools to your Mac."
37-
link="/desktop/install/mac-install/"
37+
link="/desktop/setup/install/mac-install/"
3838
icon="/assets/images/apple_48.svg" >}}
3939

4040
<br>
4141

4242
{{< card
4343
title="Docker Desktop for Windows"
4444
description="A native Windows application that delivers all Docker tools to your Windows computer."
45-
link="/desktop/install/windows-install/"
45+
link="/desktop/setup/install/windows-install/"
4646
icon="/assets/images/windows_48.svg" >}}
4747

4848
<br>

content/get-started/introduction/get-docker-desktop.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ This guide will walk you through the installation process, enabling you to exper
2828
2929
{{< card
3030
title="Docker Desktop for Mac"
31-
description="[Download (Apple Silicon)](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-arm64) | [Download (Intel)](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64) | [Install instructions](/desktop/install/mac-install)"
31+
description="[Download (Apple Silicon)](https://desktop.docker.com/mac/main/arm64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-arm64) | [Download (Intel)](https://desktop.docker.com/mac/main/amd64/Docker.dmg?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-mac-amd64) | [Install instructions](/desktop/setup/install/mac-install)"
3232
icon="/assets/images/apple_48.svg" >}}
3333

3434
<br>
3535

3636
{{< card
3737
title="Docker Desktop for Windows"
38-
description="[Download](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-windows) | [Install instructions](/desktop/install/windows-install)"
38+
description="[Download](https://desktop.docker.com/win/main/amd64/Docker%20Desktop%20Installer.exe?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-windows) | [Install instructions](/desktop/setup/install/windows-install)"
3939
icon="/assets/images/windows_48.svg" >}}
4040

4141
<br>

content/get-started/workshop/05_persisting_data.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ You can create the volume and start the container using the CLI or Docker Deskto
114114
> ```
115115
>
116116
> For more details about Git Bash's syntax differences, see
117-
> [Working with Git Bash](/desktop/troubleshoot/topics/#working-with-git-bash).
117+
> [Working with Git Bash](/desktop/troubleshoot-and-support/troubleshoot/topics/#working-with-git-bash).
118118
119119
120120
{{< /tab >}}

content/get-started/workshop/06_bind_mounts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ work.
5050

5151
1. Verify that your `getting-started-app` directory is in a directory defined in
5252
Docker Desktop's file sharing setting. This setting defines which parts of your
53-
filesystem you can share with containers. For details about accessing the setting, see [File sharing](/manuals/desktop/settings.md#file-sharing).
53+
filesystem you can share with containers. For details about accessing the setting, see [File sharing](/manuals/desktop/settings-and-maintenance/settings.md#file-sharing).
5454

5555
2. Open a terminal and change directory to the `getting-started-app`
5656
directory.

content/guides/language-translation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ To run the application using Docker:
315315
>
316316
> For Windows users, you may get an error when running the container. Verify
317317
> that the line endings in the `entrypoint.sh` are `LF` (`\n`) and not `CRLF` (`\r\n`),
318-
> then rebuild the image. For more details, see [Avoid unexpected syntax errors, use Unix style line endings for files in containers](/desktop/troubleshoot/topics/#avoid-unexpected-syntax-errors-use-unix-style-line-endings-for-files-in-containers).
318+
> then rebuild the image. For more details, see [Avoid unexpected syntax errors, use Unix style line endings for files in containers](/desktop/troubleshoot-and-support/troubleshoot/topics/#avoid-unexpected-syntax-errors-use-unix-style-line-endings-for-files-in-containers).
319319
320320
You will see the following in your console after the container starts.
321321

content/guides/named-entity-recognition.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ To run the application using Docker:
318318
>
319319
> For Windows users, you may get an error when running the container. Verify
320320
> that the line endings in the `entrypoint.sh` are `LF` (`\n`) and not `CRLF` (`\r\n`),
321-
> then rebuild the image. For more details, see [Avoid unexpected syntax errors, use Unix style line endings for files in containers](/desktop/troubleshoot/topics/#avoid-unexpected-syntax-errors-use-unix-style-line-endings-for-files-in-containers).
321+
> then rebuild the image. For more details, see [Avoid unexpected syntax errors, use Unix style line endings for files in containers](/desktop/troubleshoot-and-support/troubleshoot/topics/#avoid-unexpected-syntax-errors-use-unix-style-line-endings-for-files-in-containers).
322322
323323
You will see the following in your console after the container starts.
324324

content/guides/rust/develop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ aliases:
1212
## Prerequisites
1313

1414
- You have installed the latest version of [Docker Desktop](/get-started/get-docker.md).
15-
- You have completed the walkthroughs in the Docker Desktop [Learning Center](/manuals/desktop/get-started.md) to learn about Docker concepts.
15+
- You have completed the walkthroughs in the Docker Desktop [Learning Center](/manuals/desktop/use-desktop/_index.md) to learn about Docker concepts.
1616
- You have a [git client](https://git-scm.com/downloads). The examples in this section use a command-line based git client, but you can use any client.
1717

1818
## Overview

content/guides/sentiment-analysis.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ To run the application using Docker:
331331
>
332332
> For Windows users, you may get an error when running the container. Verify
333333
> that the line endings in the `entrypoint.sh` are `LF` (`\n`) and not `CRLF` (`\r\n`),
334-
> then rebuild the image. For more details, see [Avoid unexpected syntax errors, use Unix style line endings for files in containers](/desktop/troubleshoot/topics/#avoid-unexpected-syntax-errors-use-unix-style-line-endings-for-files-in-containers).
334+
> then rebuild the image. For more details, see [Avoid unexpected syntax errors, use Unix style line endings for files in containers](/desktop/troubleshoot-and-support/troubleshoot/topics/#avoid-unexpected-syntax-errors-use-unix-style-line-endings-for-files-in-containers).
335335
336336
You will see the following in your console after the container starts.
337337

0 commit comments

Comments
 (0)