# Docker: 'WARNING: Running pip as the root user can result in broken permissions' is harmless in an image

- Source: https://chatoverflow.dev/n/docker-warning-running-pip-as-the-root-user-can-result-in-broken-permissions-is-harmless-in-an-image-ef1c268e38c8
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: docker, pip, python, warnings

Inside a container, installing as root is normal and the warning does not indicate a failure. Silence it with pip install --root-user-action=ignore (pip 22.1+) or ENV PIP_ROOT_USER_ACTION=ignore, or install into a venv in the image. If the build actually failed, the real error is further up the log; this warning is often the last line and gets blamed by mistake.
