[PR #4763] [MERGED] Fix Dockerfile linter warnings #20321

Closed
opened 2026-04-25 22:28:16 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/4763
Author: @dfunkt
Created: 7/17/2024
Status: Merged
Merged: 7/23/2024
Merged by: @dani-garcia

Base: mainHead: fix-dockerfile-warnings


📝 Commits (1)

  • 2e93ed3 Fix Dockerfile linter warnings

📊 Changes

3 files changed (+14 additions, -11 deletions)

View changed files

📝 docker/Dockerfile.alpine (+7 -6)
📝 docker/Dockerfile.debian (+3 -2)
📝 docker/Dockerfile.j2 (+4 -3)

📄 Description

  • they seem to have started appearing with buildx v0.16.0

Alpine warnings:

13 warnings found (use --debug to expand):
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 37)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 38)
 - RedundantTargetPlatform: Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior (line 133)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 35)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 36)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 42)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 29)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 36)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 42)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 29)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 34)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 37)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 38)

Debian warnings:

5 warnings found (use --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 29)
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 38)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 29)
 - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 34)
 - RedundantTargetPlatform: Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior (line 171)

For FromPlatformFlagConstDisallowed I decided to use the 3rd variant from here:
https://github.com/moby/buildkit/blob/master/frontend/dockerfile/linter/docs/FromPlatformFlagConstDisallowed.md#description


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/dani-garcia/vaultwarden/pull/4763 **Author:** [@dfunkt](https://github.com/dfunkt) **Created:** 7/17/2024 **Status:** ✅ Merged **Merged:** 7/23/2024 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `fix-dockerfile-warnings` --- ### 📝 Commits (1) - [`2e93ed3`](https://github.com/dani-garcia/vaultwarden/commit/2e93ed3d967da270af72ab7165e774b0a3df1c91) Fix Dockerfile linter warnings ### 📊 Changes **3 files changed** (+14 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docker/Dockerfile.alpine` (+7 -6) 📝 `docker/Dockerfile.debian` (+3 -2) 📝 `docker/Dockerfile.j2` (+4 -3) </details> ### 📄 Description - they seem to have started appearing with buildx v0.16.0 Alpine warnings: ``` 13 warnings found (use --debug to expand): - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 37) - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 38) - RedundantTargetPlatform: Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior (line 133) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 35) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 36) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 42) - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 29) - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 36) - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 42) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 29) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 34) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 37) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 38) ``` Debian warnings: ``` 5 warnings found (use --debug to expand): - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 29) - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 38) - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 29) - FromPlatformFlagConstDisallowed: FROM --platform flag should not use constant value "linux/amd64" (line 34) - RedundantTargetPlatform: Setting platform to predefined $TARGETPLATFORM in FROM is redundant as this is the default behavior (line 171) ``` For ```FromPlatformFlagConstDisallowed``` I decided to use the 3rd variant from here: https://github.com/moby/buildkit/blob/master/frontend/dockerfile/linter/docs/FromPlatformFlagConstDisallowed.md#description --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 22:28:16 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#20321