ci: enhance build process#2755
Conversation
This new script is a clean way of handling the installation of packages. I think the huge `RUN` command in `Dockerfile` was hard to read and maintain. Using a script is a non-issue, as the image is rebuilt whenever the script is touched. Moreover, this commit implicitly removed the explicit Fail2Ban installation and therefore #1965, BECAUSE Debian 11 now ships with the latest and greatest Fail2Ban version (even more up-to-date than out current version it seems).
This commit should have the commit message of the previous commit. The previous commit added the appropriate envionment for building with BuildKit, and adds the `COPY --link` directive to use the official ClamAV image to copy the anti-virus bytecode. Therefore, we can drop the `frashclam` command.
There was a problem hiding this comment.
LGTM 👍
Just a few questions in the feedback, and some optional improvements.
The only change that I'd like to see is it looks like you might have forgotten to remove the FAIL2BAN_* ARGs that #1965 introduced?
All packages are accounted for still which is appreciated before dropping them in a follow-up 👍
I am not sure whether using
DOCKER_BUILDKITis a breaking change.
Technically not, because the build process is not taken into account for SemVer, right?
I don't think it is, but it should be mentioned in release notes maybe? Not sure if it affects anyone that isn't using make build or running their own build command (eg: Docker Compose can do this to extend an image, but in that case I think it just pulls our released image and there is no compatibility issue?)
Gotta love that commit title 😄
Co-authored-by: Brennan Kinney <[email protected]>
|
I removed the left-over Fail2Ban |
There was a problem hiding this comment.
Moreover, this commit implicitly removed the explicit Fail2Ban
installation and therefore #1965, BECAUSE Debian 11 now ships with the
latest and greatest Fail2Ban version
I would like to stick with the official debian package from fail2ban. This way we ensure, to get the latest version (also in the future, when Debian might stick with an older version as happen in the past).
While we at it, don't we want to use the most recent dovecot version too? 😉
Do you mind if we bring that back in a follow-up PR that is introduced as a separate stage?
Likewise, I don't mind this if we keep everything required to support it as a separate stage. This way the changes between switching from the Debian package manager to pulling in external packages to support has cleaner history of changes. Eventually, I'd like to evaluate using/supporting a different base image such as Alpine, so keeping such changes isolated is helpful. |
I don't quiet get that. With this PR, we're basically using |
I think he was referring to the There's not been a new release for sometime since though, and the next Debian release (expected around mid 2023?) may not get it (depending on if a release happens before the cutoff point for Debian). There is over 350 commits of updates since 11.2 release, so if that happens we may have to install from Github releases again, instead of just the I'm not fussed either way, but if we don't use the package, it should be contained in it's own stage. @casperklein could contribute that after this PR is merged? |
|
CI seems to be working as expected with #2753 🎉 (This will now save 13 min on every PR check due to the ARM image being build in parallel 👍🏼) |
|
TL;DR: I don't have a strong enough opinion about the
I was preferring a separate stage because it interested me in building an image without fail2ban, or being able to change the base image to something like alpine where This would apply for pretty much anything in I'm fine with it being maintained in
I don't know when a new release of f2b will happen or how important that is to the users of our image. We could do the same for As a maintainer, what I care most about (and for any future maintainers if we're lucky), is that we have something well organized and scoped. I'd like to say it'd be a |
casperklein
left a comment
There was a problem hiding this comment.
Alright. I am still not 100% convinced, but I don't want to be the blocker here.
I bet, that the time will come when Debian again will offer not the latest version of f2b. Especially with security related software, I prefer the latest version with it's features.
"But then we can add it again".. Yeah. But that's just extra work in the future while now it would be an ease to keep the current f2b solution.
Dovecot/F2B are both very easy to keep up2date, as they offer .deb files or a repository. For Postfix unfortunately, there isn't such a option.
|
Okay, alright :) Next week, I will tackle the cache issue in our CI and take care of the Fail2Ban concern raised here. |
|
Not sure if I understand you correctly. Are you going to adjust this PR or merge it soon? If the later one, I'll provide a follow up with f2b included in |
I was about to do the former, but if you want to do the latter, I won't hinder you. I will need to resolve conflicts in either way. Adding the Dovecot package via .deb files seems like a good idea, so maybe a follow-up is a good idea after all (especially since the changes would be more coherent then)? |
👍 for adding Dovecot. I would appreciate if both f2b and dovecot live in their own separate function calls in |
|
@casperklein which way do you prefer? Shall I integrate the changes into this PR or shall I or will you do a follow up PR? I prefer a follow-up 🙈 |
|
Follow up 👍 |
👍 Then I will provide a follow up. I will resolve conflicts for this PR on Monday and then we can merge this :) |
|
I meant, I'll provide a follow up. I've already something prepared 😉 |
Very nice 🚀 |
resolved merge conflicts
I saw that all other actions are using v3.1.1, and v3.1 does not actually work properly, so I updated to the latest version
61cd3fa
|
I resolved the merge conflicts and updated the docker/build-push action so that the version used across our repository is the same everywhere. |
Boom, there it is 🚀 |
Ok, I didn't expect the release to happen that soon after making such a statement 😆 😅 That just leaves |
Description
Enhances
DockerfilebyCOPY --linkfor ClamAV anti-virus bytecodeI am not sure whether using
DOCKER_BUILDKITis a breaking change. Technically not, because the build process is not taken into account for SemVer, right?PS: Sorry for the noise in the commit message. Accidentally commit the wrong files first with wrong description.
PPS: Note, this reverts #1965 implicitly. That is okay, since Debian 11 now ships with the latest version of Fail2Ban
Type of change
Checklist:
docs/)