Running as a host user within a Docker container
问题 In my team we use Docker containers to locally run our website applications while we do development on them. Assuming I'm working on a Flask app at app.py with dependencies in requirements.txt , a working flow would look roughly like this: # I am "robin" and I am in the docker group $ whoami robin $ groups robin docker # Install dependencies into a docker volume $ docker run -ti -v `pwd`:`pwd` -w `pwd` -v pydeps:/usr/local python:3-slim pip install -r requirements.txt Collecting Flask==0.12.2