-
Notifications
You must be signed in to change notification settings - Fork 966
chore: Be explicit on extras to install in Docker #598
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
Conversation
WalkthroughThe Dockerfile has been updated to introduce a new build argument, Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant DockerBuilder
participant Poetry
Developer->>DockerBuilder: Initiates build with POETRY_EXTRAS value
DockerBuilder->>DockerBuilder: Reads Dockerfile and parses ARG POETRY_EXTRAS
DockerBuilder->>Poetry: Executes "poetry install --extras '${POETRY_EXTRAS}' --no-root --without dev"
Poetry-->>DockerBuilder: Installs specified dependency extras
DockerBuilder-->>Developer: Returns the built Docker image
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
Dockerfile (2)
3-17: Explicit Build Argument for Poetry ExtrasThe introduction of the build argument
POETRY_EXTRASmakes the Docker image more configurable by letting users selectively install extra packages. However, note that the multiline string includes inline lines starting with#which may be interpreted as Dockerfile comments rather than literal parts of the variable value. If your intention is to include documentation for maintainers, consider moving those comment indicators outside of the variable assignment (or ensuring they are properly escaped) so that only the intended extra package specifiers are passed to Poetry.
40-42: Selective Dependency Installation Using ExtrasReplacing the blanket installation (
--all-extras) with a targeted one (--extras "${POETRY_EXTRAS}") enhances control over the dependencies included in the build. This improvement enables smaller image sizes and clearer documentation on what is being installed. Just ensure that thePOETRY_EXTRASvariable is correctly populated and does not inadvertently remain empty, which might lead to missing dependencies.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Dockerfile(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: lint (ubuntu-latest, 3.11.x)
- GitHub Check: lint (ubuntu-latest, 3.10.x)
- GitHub Check: Build Cognee Backend Docker App Image
- GitHub Check: docker-compose-test
🔇 Additional comments (1)
Dockerfile (1)
37-38: Disable Virtual Environment CreationDisabling the creation of a virtual environment with the command
RUN poetry config virtualenvs.create falseis appropriate in a Docker context since isolation is already provided. This change is clear and correctly implemented.
Description
Be explicit on extras to install in Docker.
DCO Affirmation
I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin
Summary by CodeRabbit
New Features
Chores