"Docker cli"의 두 판 사이의 차이
(→system) |
(→system) |
||
58번째 줄: | 58번째 줄: | ||
$ docker system prune -a -f | $ docker system prune -a -f | ||
+ | == update == | ||
+ | Update configuration of one or more containers | ||
+ | |||
+ | https://docs.docker.com/engine/reference/commandline/update/#options | ||
+ | |||
+ | == stats == | ||
+ | Display a live stream of container(s) resource usage statistics | ||
+ | |||
+ | == info == | ||
+ | Display system-wide information | ||
+ | |||
+ | == inspect == | ||
+ | Return low-level information on Docker objects | ||
+ | <br /> | ||
==Dockerfile== | ==Dockerfile== | ||
2020년 8월 31일 (월) 01:25 판
목차
설치
스크립트를 통한 설치
https://docs.docker.com/install/linux/docker-ce/#install-using-the-convenience-script
$ sudo wget -qO- https://get.docker.com/ | sh
arch계열에서 package manager를 통한 설치
$ sudo pacman -S docker
사용자 권한 추가
$ sudo usermod -aG docker $USER
$ reboot
commit
$ docker commit CONTAINER IMAGE_NAME
save
$ sudo docker save -o [파일명].tar 이미지명
load
$ docker load < [파일명].tar
docker run
한글입력
$ docker run -it -e LC_ALL=C.UTF-8 ubuntu bash
attach
컨테이너에 접속
$ sudo docker attach [컨테이너명]
종료시에는 ctrl+p, ctrl+q로 나가야 컨테이너가 종료되지 않는다.
exec
컨테이너 명령실행
$ sudo docker exec [컨테이너명] [명령어]
옵션
--user [사용자명]
build
$ sudo docker build -t [이미지명] .
cp
$ docker cp [container name]:[container 내부 경로] [host 파일경로]
volume
prune
Remove all unused local volumes
$ docker volume prune
system
도커를 사용하다보면 더이상 사용하지 않는 컨테이너와 이미지들이 저장공간을 필요없이 차지하게 된다. 이런 데이터들을 한 번에 정리할 수 있는 명령어.
$ docker system prune -a -f
update
Update configuration of one or more containers
https://docs.docker.com/engine/reference/commandline/update/#options
stats
Display a live stream of container(s) resource usage statistics
info
Display system-wide information
inspect
Return low-level information on Docker objects
Dockerfile
한글입력
ENV LC_ALL=C.UTF-8