[PR #3958] [MERGED] Container building changes #8298

Closed
opened 2026-04-16 12:21:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/3958
Author: @BlackDex
Created: 10/5/2023
Status: Merged
Merged: 10/22/2023
Merged by: @dani-garcia

Base: mainHead: release-build-revision


📝 Commits (4)

  • 685a75f WIP: Container building changes
  • a85417d Small updates
  • a765481 Update GitHub Actions Workflow
  • 79903d2 Address review remarks and small updates

📊 Changes

43 files changed (+1744 additions, -2949 deletions)

View changed files

📝 .github/workflows/build.yml (+10 -27)
📝 .github/workflows/hadolint.yml (+1 -2)
📝 .github/workflows/release.yml (+70 -135)
📝 .hadolint.yaml (+4 -2)
📝 .pre-commit-config.yaml (+1 -1)
📝 Cargo.lock (+507 -292)
📝 Cargo.toml (+33 -27)
📝 Dockerfile (+1 -1)
docker/DockerSettings.yaml (+28 -0)
docker/Dockerfile.alpine (+160 -0)
docker/Dockerfile.buildx (+0 -34)
docker/Dockerfile.debian (+194 -0)
📝 docker/Dockerfile.j2 (+148 -153)
📝 docker/Makefile (+4 -15)
📝 docker/README.md (+182 -2)
docker/amd64/Dockerfile (+0 -119)
docker/amd64/Dockerfile.alpine (+0 -116)
docker/amd64/Dockerfile.buildkit (+0 -119)
docker/amd64/Dockerfile.buildkit.alpine (+0 -116)
docker/arm64/Dockerfile (+0 -141)

...and 23 more files

📄 Description

Rework the container building.

  • Use docker buildx bake instead of custom build/push scripts
  • Just two Dockerfile's one for Debian and one for Alpine
  • Pinned openssl-sys version to v0.9.92, higher versions break Alpine builds (https://github.com/sfackler/rust-openssl/issues/2043)
  • Updated release workflow
  • Created documentation on how to use bake
  • Created a helper script bake.sh to easily bake/build the images (Read the documentation)
  • Created a podman helper script podman-bake.sh which uses podman instead of docker.
  • Updated the web-vault to v2023.9.1

I needed to change some way's to install the packages for MariaDB/MySQL, since on armv6/armel Debian it causes issues.
By downloading them and force installing via dpkg the build process still works on all platforms.

All images are tested using QEMU and also run the Favicon DDoS on all these images to verify it doesn't segfault.
The Alpine build images are now downloaded from ghcr.io instead of docker.io, maybe it helps in speed, but probably doesn't matter.

The runtime images are no longer a version maintained by Balena, they were sometimes outdated like there Alpine version was for a long time. And it also had a static qemu binary in there which only makes the image larger. Now we use the official images from both Debian and Alpine.

Also switched to the -slim rust building container, this has all the needed packages pre-installed (except for pkg-config).

Also:

  • Updated Rust to v1.73.0 (and MSRV to v1.71.1)
  • Updated all the crates possible

Fixes #3839
Fixes #3912
Fixes #3957


🔄 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/3958 **Author:** [@BlackDex](https://github.com/BlackDex) **Created:** 10/5/2023 **Status:** ✅ Merged **Merged:** 10/22/2023 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `main` ← **Head:** `release-build-revision` --- ### 📝 Commits (4) - [`685a75f`](https://github.com/dani-garcia/vaultwarden/commit/685a75f07d53f4f4d6160ec0120f7875d0abde08) WIP: Container building changes - [`a85417d`](https://github.com/dani-garcia/vaultwarden/commit/a85417d25b1ef3a0d04e3d26312cf92ca7d020f2) Small updates - [`a765481`](https://github.com/dani-garcia/vaultwarden/commit/a765481b05e751409416b6ce76278f09c6f9f3b2) Update GitHub Actions Workflow - [`79903d2`](https://github.com/dani-garcia/vaultwarden/commit/79903d241b41befb04f4195fbdd37244b60cf6e9) Address review remarks and small updates ### 📊 Changes **43 files changed** (+1744 additions, -2949 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build.yml` (+10 -27) 📝 `.github/workflows/hadolint.yml` (+1 -2) 📝 `.github/workflows/release.yml` (+70 -135) 📝 `.hadolint.yaml` (+4 -2) 📝 `.pre-commit-config.yaml` (+1 -1) 📝 `Cargo.lock` (+507 -292) 📝 `Cargo.toml` (+33 -27) 📝 `Dockerfile` (+1 -1) ➕ `docker/DockerSettings.yaml` (+28 -0) ➕ `docker/Dockerfile.alpine` (+160 -0) ➖ `docker/Dockerfile.buildx` (+0 -34) ➕ `docker/Dockerfile.debian` (+194 -0) 📝 `docker/Dockerfile.j2` (+148 -153) 📝 `docker/Makefile` (+4 -15) 📝 `docker/README.md` (+182 -2) ➖ `docker/amd64/Dockerfile` (+0 -119) ➖ `docker/amd64/Dockerfile.alpine` (+0 -116) ➖ `docker/amd64/Dockerfile.buildkit` (+0 -119) ➖ `docker/amd64/Dockerfile.buildkit.alpine` (+0 -116) ➖ `docker/arm64/Dockerfile` (+0 -141) _...and 23 more files_ </details> ### 📄 Description Rework the container building. - Use `docker buildx bake` instead of custom build/push scripts - Just two Dockerfile's one for Debian and one for Alpine - Pinned openssl-sys version to v0.9.92, higher versions break Alpine builds (https://github.com/sfackler/rust-openssl/issues/2043) - Updated release workflow - Created documentation on how to use bake - Created a helper script `bake.sh` to easily bake/build the images (Read the documentation) - Created a podman helper script `podman-bake.sh` which uses podman instead of docker. - Updated the web-vault to v2023.9.1 I needed to change some way's to install the packages for MariaDB/MySQL, since on armv6/armel Debian it causes issues. By downloading them and force installing via `dpkg` the build process still works on all platforms. All images are tested using QEMU and also run the Favicon DDoS on all these images to verify it doesn't segfault. The Alpine build images are now downloaded from ghcr.io instead of docker.io, maybe it helps in speed, but probably doesn't matter. The runtime images are no longer a version maintained by Balena, they were sometimes outdated like there Alpine version was for a long time. And it also had a static qemu binary in there which only makes the image larger. Now we use the official images from both Debian and Alpine. Also switched to the `-slim` rust building container, this has all the needed packages pre-installed (except for pkg-config). Also: - Updated Rust to v1.73.0 (and MSRV to v1.71.1) - Updated all the crates possible Fixes #3839 Fixes #3912 Fixes #3957 --- <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-16 12:21:58 -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#8298