- apt and pip install from mirrors in China,
- Python packages installed by user
root
, ifrequirements.txt
under default working directory, - local Python packages installed in develop mode by user
root
, if mounted under/dev_packages
, - non-root user supported,
- non-root user
dev
would have the sameuid:gid
as the directory mounted to/app
, if environment variableLOCAL_USER_ID
not specified, otherwise, - new user
user
would be created according to environment variableLOCAL_USER_ID
, for example, ifdocker run
with-e LOCAL_USER_ID=$(id -u)
. sudo
without password
- non-root user
- directory
/data
owned by current user.
Usages:
docker run -it --rm --network=scrapy -e DATABASE_URL -v $(pwd):/app -v $ROOT_PATH/my_awesome_package:/dev_packages/my_awesome_package caky/scrapy bash
Based on: