From 61cdf6f1cc904d95d1f77e2556089db0b118e416 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:47:50 +0200 Subject: [PATCH 1/8] ci: add dockerfile check Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- .github/workflows/build.yml | 1 + Dockerfile | 1 + docker-bake.hcl | 6 +++++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a77a80dba0..8371c27f61 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -56,6 +56,7 @@ jobs: - test - unused-media - test-go-redirects + - dockerfile-lint steps: - name: Checkout diff --git a/Dockerfile b/Dockerfile index 7ede5d3832..98d99a6750 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ # syntax=docker/dockerfile-upstream:master +# check=skip=InvalidBaseImagePlatform # ALPINE_VERSION sets the Alpine Linux version for all Alpine stages ARG ALPINE_VERSION=3.20 diff --git a/docker-bake.hcl b/docker-bake.hcl index e6a2bad99e..49d109328a 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -32,7 +32,7 @@ target "release" { } group "validate" { - targets = ["lint", "test", "unused-media", "test-go-redirects"] + targets = ["lint", "test", "unused-media", "test-go-redirects", "dockerfile-lint"] } target "test" { @@ -59,6 +59,10 @@ target "test-go-redirects" { provenance = false } +target "dockerfile-lint" { + call = "check" +} + # # releaser targets are defined in _releaser/Dockerfile # and are used for AWS S3 deployment From 1c3f34240bd4d82d74f819213a059b222a8a1be7 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:53:35 +0200 Subject: [PATCH 2/8] hugo: remove unused shortcodes Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/shortcodes/build-feature-state.html | 2 -- layouts/shortcodes/siblings.html | 13 ------------- 2 files changed, 15 deletions(-) delete mode 100644 layouts/shortcodes/build-feature-state.html delete mode 100644 layouts/shortcodes/siblings.html diff --git a/layouts/shortcodes/build-feature-state.html b/layouts/shortcodes/build-feature-state.html deleted file mode 100644 index 886e90fa04..0000000000 --- a/layouts/shortcodes/build-feature-state.html +++ /dev/null @@ -1,2 +0,0 @@ -> This feature is supported in BuildKit version `{{ .Get "buildkit_v" }}` -> and Buildx version `{{ .Get "buildx_v" }}`. diff --git a/layouts/shortcodes/siblings.html b/layouts/shortcodes/siblings.html deleted file mode 100644 index 619f97f3e3..0000000000 --- a/layouts/shortcodes/siblings.html +++ /dev/null @@ -1,13 +0,0 @@ -{{/* Links to pages in the same section that also contain this shortcode */}} - From 8ae71a65d2e0f26f4bb974261c11c684b3a810af Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 12 Aug 2024 16:57:31 +0200 Subject: [PATCH 3/8] hugo: dont print warning for introduced sc threshold Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/shortcodes/introduced.html | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/layouts/shortcodes/introduced.html b/layouts/shortcodes/introduced.html index 60b62dcfe4..20eeaa3709 100644 --- a/layouts/shortcodes/introduced.html +++ b/layouts/shortcodes/introduced.html @@ -41,18 +41,16 @@ Depends on site.Params.min_version_thresholds and i18n strings for component IDs {{ end }} {{ end }} {{- if $versionAboveThreshold }} -
- {{ partial "icon.html" "chevron_right" }} - Introduced in {{ T $component }} version - {{- if $link }} - {{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }} - {{- else }} - {{ $v }} - {{- end }} - -
- {{- else }} - {{ warnf "[introduced] version below threshold: %s %s %v" $component $v $pos }} +
+ {{ partial "icon.html" "chevron_right" }} + Introduced in {{ T $component }} version + {{- if $link }} + {{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }} + {{- else }} + {{ $v }} + {{- end }} + +
{{- end }} {{- else }} {{ errorf "[introduced] invalid component: %s %v" $component $pos }} From 886a27ae8d1191d8276851141112695b3ad986e1 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:10:15 +0200 Subject: [PATCH 4/8] hugo: cache more partials Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- layouts/_default/single.html | 2 +- layouts/partials/aside.html | 2 +- layouts/shortcodes/introduced.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7805db93e0..4c94986643 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -12,7 +12,7 @@ {{ partial "guides-stepper.html" . }} {{ end }}
- {{ partial "pagemeta.html" . }} + {{ partialCached "pagemeta.html" . . }}
{{ .Content }} diff --git a/layouts/partials/aside.html b/layouts/partials/aside.html index c08cc49436..839f549679 100644 --- a/layouts/partials/aside.html +++ b/layouts/partials/aside.html @@ -1,6 +1,6 @@ diff --git a/layouts/shortcodes/introduced.html b/layouts/shortcodes/introduced.html index 20eeaa3709..3ae8298be4 100644 --- a/layouts/shortcodes/introduced.html +++ b/layouts/shortcodes/introduced.html @@ -42,7 +42,7 @@ Depends on site.Params.min_version_thresholds and i18n strings for component IDs {{ end }} {{- if $versionAboveThreshold }}
- {{ partial "icon.html" "chevron_right" }} + {{ partialCached "icon.html" "chevron_right" "chevron_right" }} Introduced in {{ T $component }} version {{- if $link }} {{ page.RenderString (fmt.Printf `[%s](%s)` $v $link) }} From 83adeefaecee6323fdebdddb2f91795c92821cf8 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:48:39 +0200 Subject: [PATCH 5/8] ci: add check for duplicate target paths / aliases Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- .github/workflows/build.yml | 1 + Dockerfile | 12 ++++++++++++ docker-bake.hcl | 7 ++++++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8371c27f61..67e06543ea 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -57,6 +57,7 @@ jobs: - unused-media - test-go-redirects - dockerfile-lint + - path-warnings steps: - name: Checkout diff --git a/Dockerfile b/Dockerfile index 98d99a6750..3744348029 100644 --- a/Dockerfile +++ b/Dockerfile @@ -109,6 +109,18 @@ set -ex ./scripts/test_unused_media.sh EOT +# path-warnings checks for duplicate target paths +FROM build-base AS path-warnings +RUN hugo --printPathWarnings > /path-warnings.txt +RUN < Date: Mon, 12 Aug 2024 17:48:58 +0200 Subject: [PATCH 6/8] fix: duplicate aliases for the same paths Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- content/engine/logging/configure.md | 1 - content/security/for-admins/enforce-sign-in/_index.md | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/content/engine/logging/configure.md b/content/engine/logging/configure.md index 6b66213e81..42f8171b4d 100644 --- a/content/engine/logging/configure.md +++ b/content/engine/logging/configure.md @@ -9,7 +9,6 @@ aliases: - /engine/admin/reference/logging/ - /engine/admin/logging/logentries/ - /engine/admin/logging/overview/ - - /engine/admin/logging/ - /config/containers/logging/configure/ --- diff --git a/content/security/for-admins/enforce-sign-in/_index.md b/content/security/for-admins/enforce-sign-in/_index.md index 9018c67ddf..f25f57d627 100644 --- a/content/security/for-admins/enforce-sign-in/_index.md +++ b/content/security/for-admins/enforce-sign-in/_index.md @@ -4,7 +4,6 @@ toc_max: 2 keywords: authentication, registry.json, configure, enforce sign-in, docker desktop, security, title: Enforce sign-in for Docker Desktop aliases: -- /docker-hub/configure-sign-in/ - /security/for-admins/configure-sign-in/ --- @@ -42,4 +41,4 @@ following occurs: > This means that your users must use SSO to sign in, instead of a username and password. > When you enforce sign-in and enforce SSO, your users must sign in and must use SSO to do so. > See [Enforce SSO](/security/for-admins/single-sign-on/connect#optional-enforce-sso) for details on how to enable this for your SSO connection. -{ .tip } \ No newline at end of file +{ .tip } From 3ba8f08c16a3ffc9d6e5f4682298039181b55801 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:56:02 +0200 Subject: [PATCH 7/8] deps: bump hugo to version 0.132.0 Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3744348029..30ef699f8a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ RUN npm install # hugo downloads and extracts the Hugo binary FROM base AS hugo -ARG HUGO_VERSION=0.127.0 +ARG HUGO_VERSION=0.132.0 ARG TARGETARCH WORKDIR /tmp/hugo RUN wget -O "hugo.tar.gz" "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-${TARGETARCH}.tar.gz" From ee6ebcb37a08bf3db637ba0059693a1bad4a9830 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Mon, 12 Aug 2024 17:57:05 +0200 Subject: [PATCH 8/8] deps: bump markdownlint-cli2 to v0.13.0 (markdownlint 0.34.0) Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 30ef699f8a..9a13c04f58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ ARG DOCS_URL RUN hugo --gc --minify -d /out -e $HUGO_ENV -b $DOCS_URL # lint lints markdown files -FROM davidanson/markdownlint-cli2:v0.12.1 AS lint +FROM davidanson/markdownlint-cli2:v0.13.0 AS lint USER root RUN --mount=type=bind,target=. \ /usr/local/bin/markdownlint-cli2 \