Run command inside command on CMDER windows

221 Views Asked by At

I have docker and i want to remove all running container with this command on Cmder app for Windows But i got an error. How to run equivalent command on windows cmd ?

$ docker container rm -f $(docker container ls -aq)

Error response :

unknown shorthand flag: 'a' in -aq)
See 'docker container rm --help'.
1

There are 1 best solutions below

1
On

You may use first docker images which brings you all the current images.

docker images

Then you can use this command;

docker rmi -f 'firstImageId' 'secondImageId'

Details can be found on the link;https://docs.docker.com/engine/reference/commandline/rmi/