Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Dockerfile linter warnings #4763

Merged
merged 1 commit into from
Jul 23, 2024

Conversation

dfunkt
Copy link
Contributor

@dfunkt dfunkt commented Jul 17, 2024

  • 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

Copy link
Collaborator

@BlackDex BlackDex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR.

I'm fine with the as to AS change, but why add _linux_base to everything?
We do not build anything else, so that seem to be useless and cluttering the code i think. It does not have any value, and i also do not see this mentioned on the link you are revering too.

@dfunkt
Copy link
Contributor Author

dfunkt commented Jul 17, 2024

That was needed to fix the FromPlatformFlagConstDisallowed warning.
"Stage name should include the platform, OS, or architecture name to indicate that it only contains platform-specific instructions."
I used the OS variant in order to fix the warnings.

docker/Dockerfile.j2 Outdated Show resolved Hide resolved
- they seem to have started appearing with buildx v0.16.0
- skip lint check for FromPlatformFlagConstDisallowed and RedundantTargetPlatform
@dfunkt dfunkt force-pushed the fix-dockerfile-warnings branch from 1452e91 to 2e93ed3 Compare July 17, 2024 15:49
@dfunkt
Copy link
Contributor Author

dfunkt commented Jul 17, 2024

I added a way to skip the lint check for FromPlatformFlagConstDisallowed and RedundantTargetPlatform in the new revision.
Only other change that I left in is the as to AS one.

@BlackDex BlackDex requested a review from dani-garcia July 23, 2024 16:21
@dani-garcia dani-garcia merged commit 0e53f58 into dani-garcia:main Jul 23, 2024
5 checks passed
@dfunkt dfunkt deleted the fix-dockerfile-warnings branch July 24, 2024 05:22
truecharts-admin referenced this pull request in truecharts/public Aug 12, 2024
…1.32.0@71668d2 by renovate (#25023)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[docker.io/vaultwarden/server](https://togithub.com/dani-garcia/vaultwarden)
| minor | `1.31.0` -> `1.32.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>dani-garcia/vaultwarden
(docker.io/vaultwarden/server)</summary>

###
[`v1.32.0`](https://togithub.com/dani-garcia/vaultwarden/releases/tag/1.32.0)

[Compare
Source](https://togithub.com/dani-garcia/vaultwarden/compare/1.31.0...1.32.0)

#### Security Fixes

This release has several CVE Reports fixed and we recommend everybody to
update to the latest version as soon as possible.

-
[CVE-2024-39924](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39924)
Fixed via
[#&#8203;4715](https://togithub.com/dani-garcia/vaultwarden/issues/4715)
-
[CVE-2024-39925](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39925)
Fixed via
[#&#8203;4837](https://togithub.com/dani-garcia/vaultwarden/issues/4837)
-
[CVE-2024-39926](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39926)
Fixed via
[#&#8203;4737](https://togithub.com/dani-garcia/vaultwarden/issues/4737)

#### Other changes

-   Updated web-vault to v2024.6.2
- Fixed issues with password reset enrollment by rolling back a
web-vault commit

#### What's Changed

- use a custom plan of enterprise tier to fix limits by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4726](https://togithub.com/dani-garcia/vaultwarden/pull/4726)
- chore: Dockerfile to Remove port 3012 by
[@&#8203;calvin-li-developer](https://togithub.com/calvin-li-developer)
in
[https://github.com/dani-garcia/vaultwarden/pull/4725](https://togithub.com/dani-garcia/vaultwarden/pull/4725)
- Fix bug where secureNotes is empty by
[@&#8203;cobyge](https://togithub.com/cobyge) in
[https://github.com/dani-garcia/vaultwarden/pull/4730](https://togithub.com/dani-garcia/vaultwarden/pull/4730)
- Improved HTTP client by
[@&#8203;dani-garcia](https://togithub.com/dani-garcia) in
[https://github.com/dani-garcia/vaultwarden/pull/4740](https://togithub.com/dani-garcia/vaultwarden/pull/4740)
- Update admin interface by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4737](https://togithub.com/dani-garcia/vaultwarden/pull/4737)
- Fix for RSA Keys which are read only by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4744](https://togithub.com/dani-garcia/vaultwarden/pull/4744)
- Fix Email 2FA login on native app by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4762](https://togithub.com/dani-garcia/vaultwarden/pull/4762)
- Update crates & fix crate vulnerability by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4771](https://togithub.com/dani-garcia/vaultwarden/pull/4771)
- Fix Dockerfile linter warnings by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4763](https://togithub.com/dani-garcia/vaultwarden/pull/4763)
- allow re-invitations of existing users by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4768](https://togithub.com/dani-garcia/vaultwarden/pull/4768)
- Allow to override log level for specific target by
[@&#8203;Timshel](https://togithub.com/Timshel) in
[https://github.com/dani-garcia/vaultwarden/pull/4305](https://togithub.com/dani-garcia/vaultwarden/pull/4305)
- Add support for MFA with Duo's Universal Prompt by
[@&#8203;0x0fbc](https://togithub.com/0x0fbc) in
[https://github.com/dani-garcia/vaultwarden/pull/4637](https://togithub.com/dani-garcia/vaultwarden/pull/4637)
- Allow to increase the note size to 100\_000 by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4772](https://togithub.com/dani-garcia/vaultwarden/pull/4772)
- Update Rust, Crates and GHA by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4783](https://togithub.com/dani-garcia/vaultwarden/pull/4783)
- Duo: use the formatted db email by
[@&#8203;Timshel](https://togithub.com/Timshel) in
[https://github.com/dani-garcia/vaultwarden/pull/4779](https://togithub.com/dani-garcia/vaultwarden/pull/4779)
- Update rust-toolchain.toml to 1.80.0 by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4784](https://togithub.com/dani-garcia/vaultwarden/pull/4784)
- fix issue with adding ciphers to organizations on native ios app by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4800](https://togithub.com/dani-garcia/vaultwarden/pull/4800)
- Rewrite the Push Notifications section in the configuration template
by [@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4805](https://togithub.com/dani-garcia/vaultwarden/pull/4805)
- Secure send file uploads by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4810](https://togithub.com/dani-garcia/vaultwarden/pull/4810)
- make access_all optional by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4812](https://togithub.com/dani-garcia/vaultwarden/pull/4812)
- Remove lowercase conversion for featureStates by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4820](https://togithub.com/dani-garcia/vaultwarden/pull/4820)
- Fix mail::send_incomplete\_2fa_login panic issue by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4792](https://togithub.com/dani-garcia/vaultwarden/pull/4792)
- Update crates, web-vault and fixes by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4823](https://togithub.com/dani-garcia/vaultwarden/pull/4823)
- Updated web-vault to v2024.6.2b by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4826](https://togithub.com/dani-garcia/vaultwarden/pull/4826)
- Update Rust to 1.80.1 by [@&#8203;dfunkt](https://togithub.com/dfunkt)
in
[https://github.com/dani-garcia/vaultwarden/pull/4831](https://togithub.com/dani-garcia/vaultwarden/pull/4831)
- Fix data disclosure on organization endpoints by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4837](https://togithub.com/dani-garcia/vaultwarden/pull/4837)

#### New Contributors

- [@&#8203;cobyge](https://togithub.com/cobyge) made their first
contribution in
[https://github.com/dani-garcia/vaultwarden/pull/4730](https://togithub.com/dani-garcia/vaultwarden/pull/4730)
- [@&#8203;0x0fbc](https://togithub.com/0x0fbc) made their first
contribution in
[https://github.com/dani-garcia/vaultwarden/pull/4637](https://togithub.com/dani-garcia/vaultwarden/pull/4637)

**Full Changelog**:
dani-garcia/vaultwarden@1.31.0...1.32.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNS4wIiwidXBkYXRlZEluVmVyIjoiMzguMjUuMCIsInRhcmdldEJyYW5jaCI6Im1hc3RlciIsImxhYmVscyI6WyJhdXRvbWVyZ2UiLCJ1cGRhdGUvZG9ja2VyL2dlbmVyYWwvbm9uLW1ham9yIl19-->
renovate bot referenced this pull request in NorkzYT/Wolflith Aug 15, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [vaultwarden/server](https://togithub.com/dani-garcia/vaultwarden) |
minor | `1.31.0` -> `1.32.0` |

---

### Release Notes

<details>
<summary>dani-garcia/vaultwarden (vaultwarden/server)</summary>

###
[`v1.32.0`](https://togithub.com/dani-garcia/vaultwarden/releases/tag/1.32.0)

[Compare
Source](https://togithub.com/dani-garcia/vaultwarden/compare/1.31.0...1.32.0)

#### Security Fixes

This release has several CVE Reports fixed and we recommend everybody to
update to the latest version as soon as possible.

-
[CVE-2024-39924](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39924)
Fixed via
[#&#8203;4715](https://togithub.com/dani-garcia/vaultwarden/issues/4715)
-
[CVE-2024-39925](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39925)
Fixed via
[#&#8203;4837](https://togithub.com/dani-garcia/vaultwarden/issues/4837)
-
[CVE-2024-39926](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2024-39926)
Fixed via
[#&#8203;4737](https://togithub.com/dani-garcia/vaultwarden/issues/4737)

#### Other changes

-   Updated web-vault to v2024.6.2
- Fixed issues with password reset enrollment by rolling back a
web-vault commit

#### What's Changed

- use a custom plan of enterprise tier to fix limits by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4726](https://togithub.com/dani-garcia/vaultwarden/pull/4726)
- chore: Dockerfile to Remove port 3012 by
[@&#8203;calvin-li-developer](https://togithub.com/calvin-li-developer)
in
[https://github.com/dani-garcia/vaultwarden/pull/4725](https://togithub.com/dani-garcia/vaultwarden/pull/4725)
- Fix bug where secureNotes is empty by
[@&#8203;cobyge](https://togithub.com/cobyge) in
[https://github.com/dani-garcia/vaultwarden/pull/4730](https://togithub.com/dani-garcia/vaultwarden/pull/4730)
- Improved HTTP client by
[@&#8203;dani-garcia](https://togithub.com/dani-garcia) in
[https://github.com/dani-garcia/vaultwarden/pull/4740](https://togithub.com/dani-garcia/vaultwarden/pull/4740)
- Update admin interface by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4737](https://togithub.com/dani-garcia/vaultwarden/pull/4737)
- Fix for RSA Keys which are read only by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4744](https://togithub.com/dani-garcia/vaultwarden/pull/4744)
- Fix Email 2FA login on native app by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4762](https://togithub.com/dani-garcia/vaultwarden/pull/4762)
- Update crates & fix crate vulnerability by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4771](https://togithub.com/dani-garcia/vaultwarden/pull/4771)
- Fix Dockerfile linter warnings by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4763](https://togithub.com/dani-garcia/vaultwarden/pull/4763)
- allow re-invitations of existing users by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4768](https://togithub.com/dani-garcia/vaultwarden/pull/4768)
- Allow to override log level for specific target by
[@&#8203;Timshel](https://togithub.com/Timshel) in
[https://github.com/dani-garcia/vaultwarden/pull/4305](https://togithub.com/dani-garcia/vaultwarden/pull/4305)
- Add support for MFA with Duo's Universal Prompt by
[@&#8203;0x0fbc](https://togithub.com/0x0fbc) in
[https://github.com/dani-garcia/vaultwarden/pull/4637](https://togithub.com/dani-garcia/vaultwarden/pull/4637)
- Allow to increase the note size to 100\_000 by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4772](https://togithub.com/dani-garcia/vaultwarden/pull/4772)
- Update Rust, Crates and GHA by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4783](https://togithub.com/dani-garcia/vaultwarden/pull/4783)
- Duo: use the formatted db email by
[@&#8203;Timshel](https://togithub.com/Timshel) in
[https://github.com/dani-garcia/vaultwarden/pull/4779](https://togithub.com/dani-garcia/vaultwarden/pull/4779)
- Update rust-toolchain.toml to 1.80.0 by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4784](https://togithub.com/dani-garcia/vaultwarden/pull/4784)
- fix issue with adding ciphers to organizations on native ios app by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4800](https://togithub.com/dani-garcia/vaultwarden/pull/4800)
- Rewrite the Push Notifications section in the configuration template
by [@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4805](https://togithub.com/dani-garcia/vaultwarden/pull/4805)
- Secure send file uploads by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4810](https://togithub.com/dani-garcia/vaultwarden/pull/4810)
- make access_all optional by
[@&#8203;stefan0xC](https://togithub.com/stefan0xC) in
[https://github.com/dani-garcia/vaultwarden/pull/4812](https://togithub.com/dani-garcia/vaultwarden/pull/4812)
- Remove lowercase conversion for featureStates by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4820](https://togithub.com/dani-garcia/vaultwarden/pull/4820)
- Fix mail::send_incomplete\_2fa_login panic issue by
[@&#8203;dfunkt](https://togithub.com/dfunkt) in
[https://github.com/dani-garcia/vaultwarden/pull/4792](https://togithub.com/dani-garcia/vaultwarden/pull/4792)
- Update crates, web-vault and fixes by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4823](https://togithub.com/dani-garcia/vaultwarden/pull/4823)
- Updated web-vault to v2024.6.2b by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4826](https://togithub.com/dani-garcia/vaultwarden/pull/4826)
- Update Rust to 1.80.1 by [@&#8203;dfunkt](https://togithub.com/dfunkt)
in
[https://github.com/dani-garcia/vaultwarden/pull/4831](https://togithub.com/dani-garcia/vaultwarden/pull/4831)
- Fix data disclosure on organization endpoints by
[@&#8203;BlackDex](https://togithub.com/BlackDex) in
[https://github.com/dani-garcia/vaultwarden/pull/4837](https://togithub.com/dani-garcia/vaultwarden/pull/4837)

#### New Contributors

- [@&#8203;cobyge](https://togithub.com/cobyge) made their first
contribution in
[https://github.com/dani-garcia/vaultwarden/pull/4730](https://togithub.com/dani-garcia/vaultwarden/pull/4730)
- [@&#8203;0x0fbc](https://togithub.com/0x0fbc) made their first
contribution in
[https://github.com/dani-garcia/vaultwarden/pull/4637](https://togithub.com/dani-garcia/vaultwarden/pull/4637)

**Full Changelog**:
dani-garcia/vaultwarden@1.31.0...1.32.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 10pm every weekday,every
weekend,before 5am every weekday" in timezone America/New_York,
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/NorkzYT/Wolflith).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6InN0YWdpbmciLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIiwibWlub3IiLCJyZW5vdmF0ZSJdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants