-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow Docker base image override #2160
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
base: main
Are you sure you want to change the base?
Allow Docker base image override #2160
Conversation
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|
Added BASE_IMAGE validation in Dockerfile (checks for apt-get + python) and documented requirements in gitlab install docs. |
|
/review |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
| ```bash | ||
| docker build --build-arg BASE_IMAGE=python:3.12.10-slim \ | ||
| -t gitlab_pr_agent --target gitlab_webhook -f docker/Dockerfile | ||
| ``` |
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 think it's worth aligning with the example above 🙏
| ```bash | |
| docker build --build-arg BASE_IMAGE=python:3.12.10-slim \ | |
| -t gitlab_pr_agent --target gitlab_webhook -f docker/Dockerfile | |
| ``` | |
| ```bash | |
| docker build . --build-arg BASE_IMAGE=python:3.12.10-slim \ | |
| -t gitlab_pr_agent --target gitlab_webhook -f docker/Dockerfile |
|
|
||
| ```bash | ||
| docker build . -t gitlab_pr_agent --target gitlab_webhook -f docker/Dockerfile | ||
| docker push codiumai/pr-agent:gitlab_webhook # Push to your Docker repository |
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.
Let's also add this note to all the other relevant providers
|
Hey @evanscastonguay, Overall LGTM, after my comments are addressed I'll gladly approve and merge this |
User description
Summary
Testing
docker buildlocally (Docker daemon not running)PR Type
Enhancement, Documentation
Description
Add
BASE_IMAGEbuild argument to Dockerfile for custom base image overrideDocument custom base image usage in GitLab installation guide
Fix trailing newline in documentation file
Diagram Walkthrough
File Walkthrough
Dockerfile
Parameterize Docker base image with build argumentdocker/Dockerfile
ARG BASE_IMAGE=python:3.12.10-slimargument at the beginningFROM python:3.12.10-slimwithFROM ${BASE_IMAGE}gitlab.md
Document custom base image build argument usagedocs/docs/installation/gitlab.md
docker buildcommand with--build-arg BASE_IMAGEparameter