-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add Docker pipeline #295
base: master
Are you sure you want to change the base?
Add Docker pipeline #295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't review the GitHub actions part as I'm not familiar with it. At least, it looks plausible. 😅 However, I want to recommend some minor tweaks to the Dockerfile
to minimize the resulting image layers.
The same optimization could, in theory, be made for the build
image. However, since this is just an ephemeral image, it really doesn't matter and therefore I left it out.
|
||
|
||
# Clean-up dist | ||
RUN rm -rf /dist |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, this should be combined into one RUN
command instead to reduce overhead:
RUN make install && rm -rf /dist
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: Sorry for the spam. 🙈 I messed up the previous review... This is the same issue as mentioned above...
|
||
## Install shared dependencies | ||
RUN apk update | ||
RUN apk add --no-cache openssl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is good practice to combine the RUN
commands into on single command in order to not create unnecessary layers in the final images. As the shared
image is also being used by the final
image, it would make sense to combine them:
RUN apk add --no-cache openssl make lua5.1 pcre2
Also, apk update
is not needed here: when called with the --no-cache
option, apk add
does not make use of any locally cached information (as provided by apk update
) but instead fetches all required data from the repo. 😊
Add proper1 pipeline to build and push a lightweight (based on Alpine) Docker image with imapfilter; I expect it to replase this drastically outdated image at DockerHub.
1 — free and open, with easily verifiable source code.