강의

멘토링

로드맵

Inflearn Community Q&A

wlskaka226699's profile image
wlskaka226699

asked

Learning Docker and CI Environments by Following Along [Updated 2023.11]

Deleting Container

모든 컨테이너 삭제

Written on

·

622

1

모든 컨테이너 삭제 명령어가 window환경에서도 docker rm `docker ps -a -q`가 맞나요? 

윈도우에선 작동하지 않는거같아요. 검색해보니 docker rm $(docker ps -a -q)라는 것도 있는데 이것도 안됩니다

dockergithubawstravis-cicicd데이터 엔지니어링

Quiz

52% of people got it wrong. Give it a try!

When running a container using the `docker run image_name command` format, how does the last `command` work?

Added before the base command of the image.

Ignore the image's default command and execute that command.

It runs simultaneously with the base command of the image.

Only runs when the image has no default command.

Answer 3

2

₩명령어₩ 와 $(명령어)는 쉘에서 명령어를 실행하기 위해 사용하는 것으로 알고있습니다.

아마 윈도우 CMD를 통해 사용하는 방법이 아닌 PowerShell 과 같이 쉘을 따로 띄워 도커 명령어를 사용하는 방법인 것 같아요.

윈도우에서 모든 컨테이너를 삭제하는 방법에 여러 방법이 있는 것 같은데 이런 방법도 있네요.

https://medium.com/sjk5766/windows%EC%97%90%EC%84%9C-docker-container-%EC%A0%84%EC%B2%B4-%EC%82%AD%EC%A0%9C-172940695895

좋은 답변감사합니다. !! 

0

 docker container prune

 

0

docker ps -aq | xargs -n 1 docker rm

이 명령어도 안먹히시는 분 없나요?? 저는  'xargs'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.

라는 에러가 뜨네요

wlskaka226699's profile image
wlskaka226699

asked

Ask a question