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

Best practice proposal: do not recommend --system for a Docker context #2762

Merged

Commits on Aug 20, 2018

  1. Do not recommend --system for a Docker context

    Despite an application's Docker container not usually running other Python processes than the application itself, it still has a system Python whose packages should not necessarily be overwritten or upgraded by an application's choices.
    
    For example, `python3-software-properties` in Ubuntu contains utilities
    written in Python like `add-apt-repository` whose [use is widespread in
    Dockerfiles](https://github.com/search?l=Dockerfile&q=%22add-apt-repository%22&type=Code).
    
    By inadvertently applying an application's dependency onto the the container's Python, it is possible to:
    
    - subtly break system-level software like these that is still present in the container image
    - run into errors where that software is executed while extending the image with another Dockerfile
    - run into errors when `docker run|exec ... COMMAND` is used to run another process inside the same container for debugging purposes
    
    I realize this is not necessarily a likely use case, but we have seen
    enough projects/tools vendoring `Requests` in fear of a conflict.
    
    Very open on the wording and whether `system Python` is the correct term
    to designate the global Python for that OS/container image.
    giorgiosironi committed Aug 20, 2018
    Configuration menu
    Copy the full SHA
    45b5e7d View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7c512a5 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2018

  1. Configuration menu
    Copy the full SHA
    418574f View commit details
    Browse the repository at this point in the history