Skip to content
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

Multi-arch DB image fix & Copying unprivileged init script #33

Merged
merged 11 commits into from
Jan 12, 2024

Conversation

rsundriyal
Copy link
Contributor

@rsundriyal rsundriyal commented Nov 7, 2023

Fixing tagging for debian multi-arch images.

Dividing Dockerfile RUN commands into sub commands.

Adding readme file changes.

Copying unprivileged init script so that any user can use it by overriding --entrypoint option in docker run.

Resolves: #32
Related to:

@rsundriyal rsundriyal changed the title Copying unprivileged init script so that any user can use it by overr… Multi-arch DB image fix & Copying unprivileged init script Nov 7, 2023
@val-ms val-ms self-requested a review November 13, 2023 19:31
mkdir -p "./build" && cd "./build" && \
rust

RUN mkdir -p "./build" && cd "./build" && \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a decent chance someone else will complain about this because cached layers increase the size of an image. However, I see a strong benefit to it -- particularly for the debian Dockerfiles where the multiarch builds take a really long time. We just have to remember the reason to defend this position, when people complain about it later.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking at our current images and seeing some older CVE's even though we run a build and push updates to the images every week. I think that's because caching doesn't know when the apk-installed packages have changed. So it uses the old cached layers.

I'm unsure how to solve this problem without forcing docker to rebuild without used the cached layers... which means that this change wouldn't help any and will only have the negative effect of increasing the size of the image by inserting those layers.

Any ideas?

clamav/README-alpine.md Outdated Show resolved Hide resolved
clamav/README-debian.md Outdated Show resolved Hide resolved
clamav/1.0/debian/Jenkinsfile Show resolved Hide resolved
clamav/1.0/debian/Jenkinsfile Outdated Show resolved Hide resolved
@theseanything
Copy link

Is making the unprivileged init script available blocked by the fix for the multi-arch builds? Would it be possible to merge in a separate PR with the unprivileged init scripts commit?

theseanything added a commit to alphagov/govuk-infrastructure that referenced this pull request Jan 9, 2024
The current official Clamav image cannot be run unprivileged by default.
This adds a script and changes the file permissions, so that it can run
as non-root. At time of writing, there is a pending PR to add this
functionality to the offical image:
Cisco-Talos/clamav-docker#33. Once this is
available we can switch to the offical image.
theseanything added a commit to alphagov/govuk-infrastructure that referenced this pull request Jan 9, 2024
The current official Clamav image cannot be run unprivileged by default.
This adds a script and changes the file permissions, so that it can run
as non-root. At time of writing, there is a pending PR to add this
functionality to the offical image:
Cisco-Talos/clamav-docker#33. Once this is
available we can switch to the offical image.
@rsundriyal
Copy link
Contributor Author

Changes are tested and ready to be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unprivileged entrypoint not included
3 participants