[PR #784] [MERGED] Use Debian base image for all steps of the build process #2666

Closed
opened 2025-11-07 07:51:15 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/dani-garcia/vaultwarden/pull/784
Author: @ypid
Created: 12/28/2019
Status: Merged
Merged: 1/5/2020
Merged by: @dani-garcia

Base: masterHead: docker/use-debian-base


📝 Commits (10+)

  • f250c54 WIP: Use Debian base image for all steps of the build process
  • 8280d20 Generate Dockerfiles from one source for maintainability. Closes #785.
  • 43aa75d Fix cross platform build support, thanks to @dani-garcia for the review
  • 0f0e587 Move dpkg --add-architecture before the first apt call
  • 47a5a4e Fix package name for Ubuntu 16.04 based image. Thanks @dani-garcia!
  • 7a0bb18 Make cargo new independent of workdir to be exact
  • 43adcde Move rustup target before cargo build. Thanks to @dani-garcia!
  • 078b21d Fix armv6 build, thanks to @dani-garcia for the review!
  • 1698b43 Readd missing cargo setup for armv7. Thanks to @dani-garcia!
  • 146525d Improve Jinja2 template logic a bit

📊 Changes

15 files changed (+851 additions, -170 deletions)

View changed files

docker/Dockerfile.j2 (+322 -0)
docker/Makefile (+9 -0)
📝 docker/aarch64/mysql/Dockerfile (+60 -20)
📝 docker/aarch64/sqlite/Dockerfile (+55 -20)
📝 docker/amd64/mysql/Dockerfile (+24 -7)
📝 docker/amd64/mysql/Dockerfile.alpine (+30 -7)
📝 docker/amd64/postgresql/Dockerfile (+26 -16)
📝 docker/amd64/postgresql/Dockerfile.alpine (+30 -8)
📝 docker/amd64/sqlite/Dockerfile (+25 -8)
📝 docker/amd64/sqlite/Dockerfile.alpine (+29 -7)
📝 docker/armv6/mysql/Dockerfile (+59 -19)
📝 docker/armv6/sqlite/Dockerfile (+54 -19)
📝 docker/armv7/mysql/Dockerfile (+58 -20)
📝 docker/armv7/sqlite/Dockerfile (+53 -19)
docker/render_template (+17 -0)

📄 Description

No need to use two different base images. Debian buster is pulled later anyway so we can just use it for the vault stage as well.

My reason for this change is partly to avoid redundancy and partly to make it easier to build everything yourself. When all the build environment is based on Debian than you just have to figure out how to build a Debian Docker base image (ref: https://github.com/ypid/docker-makefile).

WIP: This PR is incomplete. I first wanted to check if this is acceptable two you because I put together a short script to replace this in all the Dockerfiles.

I assume the broken windows CI build is not my fault. Why support Windows anyway ;-)


🔄 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/784 **Author:** [@ypid](https://github.com/ypid) **Created:** 12/28/2019 **Status:** ✅ Merged **Merged:** 1/5/2020 **Merged by:** [@dani-garcia](https://github.com/dani-garcia) **Base:** `master` ← **Head:** `docker/use-debian-base` --- ### 📝 Commits (10+) - [`f250c54`](https://github.com/dani-garcia/vaultwarden/commit/f250c5481302280360a89c25a5fd02607b91c53f) WIP: Use Debian base image for all steps of the build process - [`8280d20`](https://github.com/dani-garcia/vaultwarden/commit/8280d200ea6c39757783f02756eb45141d3e50fe) Generate Dockerfiles from one source for maintainability. Closes #785. - [`43aa75d`](https://github.com/dani-garcia/vaultwarden/commit/43aa75dc89c60a994ed89a93b44622f01e9b90ba) Fix cross platform build support, thanks to @dani-garcia for the review - [`0f0e587`](https://github.com/dani-garcia/vaultwarden/commit/0f0e5876aeaae3a97773540dc90b05daa9d462f4) Move `dpkg --add-architecture` before the first apt call - [`47a5a4e`](https://github.com/dani-garcia/vaultwarden/commit/47a5a4e1fcba7c89e6fba90a23c05b6353b0c013) Fix package name for Ubuntu 16.04 based image. Thanks @dani-garcia! - [`7a0bb18`](https://github.com/dani-garcia/vaultwarden/commit/7a0bb18dcfc3855baa5c4019f159cbfc42f4e8aa) Make `cargo new` independent of workdir to be exact - [`43adcde`](https://github.com/dani-garcia/vaultwarden/commit/43adcde0946da746aaf99f31012a5c00c517b850) Move `rustup target` before `cargo build`. Thanks to @dani-garcia! - [`078b21d`](https://github.com/dani-garcia/vaultwarden/commit/078b21db85b26595aa0f4d880b7f6a60a2c75504) Fix armv6 build, thanks to @dani-garcia for the review! - [`1698b43`](https://github.com/dani-garcia/vaultwarden/commit/1698b43f9bb6ea3f82db58e956f05dbbc002fe1b) Readd missing cargo setup for armv7. Thanks to @dani-garcia! - [`146525d`](https://github.com/dani-garcia/vaultwarden/commit/146525db9195f1be45aff8b7b0abfc0970392c8b) Improve Jinja2 template logic a bit ### 📊 Changes **15 files changed** (+851 additions, -170 deletions) <details> <summary>View changed files</summary> ➕ `docker/Dockerfile.j2` (+322 -0) ➕ `docker/Makefile` (+9 -0) 📝 `docker/aarch64/mysql/Dockerfile` (+60 -20) 📝 `docker/aarch64/sqlite/Dockerfile` (+55 -20) 📝 `docker/amd64/mysql/Dockerfile` (+24 -7) 📝 `docker/amd64/mysql/Dockerfile.alpine` (+30 -7) 📝 `docker/amd64/postgresql/Dockerfile` (+26 -16) 📝 `docker/amd64/postgresql/Dockerfile.alpine` (+30 -8) 📝 `docker/amd64/sqlite/Dockerfile` (+25 -8) 📝 `docker/amd64/sqlite/Dockerfile.alpine` (+29 -7) 📝 `docker/armv6/mysql/Dockerfile` (+59 -19) 📝 `docker/armv6/sqlite/Dockerfile` (+54 -19) 📝 `docker/armv7/mysql/Dockerfile` (+58 -20) 📝 `docker/armv7/sqlite/Dockerfile` (+53 -19) ➕ `docker/render_template` (+17 -0) </details> ### 📄 Description No need to use two different base images. Debian buster is pulled later anyway so we can just use it for the vault stage as well. My reason for this change is partly to avoid redundancy and partly to make it easier to build everything yourself. When all the build environment is based on Debian than you just have to figure out how to build a Debian Docker base image (ref: https://github.com/ypid/docker-makefile). ~~WIP: This PR is incomplete. I first wanted to check if this is acceptable two you because I put together a short script to replace this in all the Dockerfiles.~~ I assume the broken windows CI build is not my fault. Why support Windows anyway ;-) --- <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 2025-11-07 07:51:15 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#2666