chore(docker): Clean up the docker image#1954
chore(docker): Clean up the docker image#1954williamdes wants to merge 1 commit intodocker-mailserver:masterfrom williamdes:master
Conversation
|
The PR description was altered to not include the checks that PR creators should perform or indicate that such a check may be missing. What's more, CI is failing. I like the image improvements, but as is, this is definitely WIP. |
|
I improved my PR description, and hope the tests will pass. I do not see anything wrong that could fail them Here is the container diff
|
BTW: Why not merging all layers easily with something like: FROM docker.io/debian:buster-slim as build
[..]
# build final image
FROM scratch
COPY --from=build / / |
Indeed! Edit: the down side is base layer re-use and audit 0% possible |
|
If it is possible it would be better to have 3 layers, because with this current config the user will not be able to re-use a already existing base image from the file system. Would be cool if possible to have:
Not sure how to do this |
|
Yes, that is the big disadvantage when squashing all layers into one. There is an open issue that would solve this. |
I doubt it 😄 The checkmarks are there to remind contributors about what to cover and to reflect the current progress of the PR. Simply checking everything does not help anyone. Then it would be better to leave it unchecked as everyone can simply see that tests are not covered right now and might produce some errors in the current state. |
wernerfred
left a comment
There was a problem hiding this comment.
Currently the tests are failing mainly to missing log entries. This might be the case that either the expected lines are not in the log (e.g. problem with startup) or the log file is missing completely (e.g. bc it gets removed). Could it be that your cleanup removed a bit too much of log files? 😄
All-in-all i appreciate a smaller image size (although not always useful; we had a discussion already between image size vs. startup time) but the current state is maximal broken:
bats warning: Executed 65 instead of expected 339 tests
(and those 65 are all failing, too)
| rm /usr/share/applications/*.desktop && \ | ||
| rm -rf /usr/share/apps/konqueror && \ | ||
| rm -rf /usr/share/apps/konsole && \ |
There was a problem hiding this comment.
Do these locations/files really get created or is this just a "most complete" list of dirs to remove after installation?
There was a problem hiding this comment.
Yes, they get created
I would recommend you to use the tool dive to have a look ;)
I am not able to run the tests in local, not sure why but last time I also could not. (some get stuck)
Probably, I will try to find out 😄 And maybe revert the image squash command as it is not acceptable. |
Description
Using the tool dive I found out that some files are removed in other layers but this is not right because of the union file system design.
Before:
After:
Type of change
Checklist: