xxxxxxxxxx
docker container rm -f $(docker ps -aq)
xxxxxxxxxx
$ docker rm $(docker ps --filter status=exited -q)
$ docker ps --filter status=exited -q | xargs docker rm
xxxxxxxxxx
first you have to install python3 (or more recent versions) then the library 'venv' from the terminal:
pip install venv
then create your virtual envirnonment:
python3 -m venv env
('env' is the name of your envirnoment - you can have any name you see fit)
once created you can access env by typing in the terminal:
source env/bin/activate
now you are in env, you can exit by simply typing:
deactivate (for newer versions)
source deactivate (for older ones)