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

Use minimal base image for Network Policy agent; update Golang version to 1.21.7 #212

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

jdn5126
Copy link
Contributor

@jdn5126 jdn5126 commented Feb 15, 2024

Issue #, if available:
#109

Description of changes:
This PR modifies the Network Policy agent Dockerfile to use eks-distro-minimal-base-glibc as the base image. This minimal image, along with removing the libraries that were installed using yum, significantly decreases the size of the container image. My personal build showed a decrease from ~290MB to ~38MB.

A smaller container image means faster image pulls and a smaller surface area for CVEs.

For the libraries that were installed in the container filesystem using yum, such as libbpf-devel, it turns out that none of these are needed at runtime. The object files created in the bpfbuilder stage already have everything they need statically linked.

Also, I updated the Golang builder image to Golang 1.21.7.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@jayanthvn jayanthvn left a comment

Choose a reason for hiding this comment

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

lgtm..

@jdn5126 jdn5126 merged commit 28acf4f into aws:main Feb 16, 2024
4 checks passed
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.

2 participants