Try `exec` instead of `run`. `run` runs the command in a new container, so 
each time you perform `docker-compose run web <command>`, a new copy of the 
container is created. See the documentation: 
https://docs.docker.com/compose/reference/run/

On Wednesday, 10 April 2019 11:56:53 UTC+2, Shubham Joshi wrote:
>
> I am trying to upgrade pip version in docker
>
>
> snj@snj-ThinkPad-T440p:~/school$ sudo docker-compose run web pip install 
> --upgrade pip
> Starting school_db_1 ... done
> Collecting pip
>   Downloading 
> https://files.pythonhosted.org/packages/d8/f3/413bab4ff08e1fc4828dfc59996d721917df8e8583ea85385d51125dceff/pip-19.0.3-py2.py3-none-any.whl
>  
> (1.4MB)
>     100% |████████████████████████████████| 1.4MB 62kB/s
> Installing collected packages: pip
>   Found existing installation: pip 9.0.1
>     Uninstalling pip-9.0.1:
>       Successfully uninstalled pip-9.0.1
> Successfully installed pip-19.0.3
> snj@snj-ThinkPad-T440p:~/school$ sudo docker-compose run web pip --version
> Starting school_db_1 ... done
> pip 9.0.1 from /usr/local/lib/python3.6/site-packages (python 3.6)
> snj@snj-ThinkPad-T440p:~/school$
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ba933ef5-7178-4b54-925f-0ee42ad456c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to