-
Notifications
You must be signed in to change notification settings - Fork 615
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 lightweight base docker image #1304
Conversation
Signed-off-by: Yu Ishikawa <[email protected]>
Signed-off-by: Yu Ishikawa <[email protected]>
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨Explore these optional code suggestions:
|
@mrT23 I don't want to bother you, but I would appreciate if you could give your thoughts on the change. Thanks! |
Hi @yu-iskw , thanks for the PR Reducing the docker size is a worthy goal. We do get a meaningful reduction in size when moving from On my first test, the slim docker ( So I tend not to switch to it. Chasing after missing packages, only in a GitHub action environment, is not a path I want to go to. However, the other changes in this PR are good. |
@mrT23 Thank you for the feedback. I totally understand that it would be a bit hassle to purse missing dependencies, though we can automate to check if a built docker image works as expected in GitHub Action. I will close the PR. Again, thanks! |
i do like the other changes. The docker looks better and cleaner with them If you want to merge them in this PR, cool, or I would re-open them in another PR |
User description
Overview
According to my research, it takes about 35 seconds to pull and build the docker image of pr-agent in GitHub Actions. I assume that we can speed up by using a base docker image which is lighter than
python:3.10
. My assumption is to speed up the GitHub Actions' step to prepare for pr-agent usingpython:3.10-slim
. If that works as expected, the elapsed time to run a GitHub Actions with pr-agent gets shorter.PR Type
enhancement
Description
python:3.10
topython:3.10-slim
to reduce the image size and potentially speed up the build process.ADD
withCOPY
for copying files, which is more efficient and clearer in this context.Changes walkthrough 📝
Dockerfile.github_action
Optimize Dockerfile with a lightweight base image and refactoring
Dockerfile.github_action
python:3.10
topython:3.10-slim
for a lighterbuild.
COPY
instead ofADD
for better clarity and efficiency.