Update Docker docs to clarify --system flag usage#6461
Merged
Conversation
Adds a new section explaining when to use --system (single-app containers) vs. virtual environments (containers with multiple Python apps or system tools). Updates the best practices summary to reflect this nuanced guidance. Closes #6438
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses #6438 by clarifying the Docker documentation on when to use the
--systemflag vs. a virtual environment.Changes
Added a new section "System Installation vs. Virtual Environments in Docker" that explains:
--system: Single-application containers following the "one process per container" principle, slim base images, simpler setupadd-apt-repository)Updated the Best Practices summary (Fix where command invocation #5) to reflect this nuanced guidance.
Context
In 2018 (PR #2762), it was recommended NOT to use
--systemdue to concerns about breaking system Python tools. However:--systemsupport (Enhance --system flag support for Docker workflows #6454, Validate Python version when using --system flag #6453, Fix the --system without --deploy flag bug #6297) make it more robustFor most production containers,
--systemis now the simpler and more efficient choice.Closes #6438
Pull Request opened by Augment Code with guidance from the PR author