<get container image from docker hub>
docker pull {image_name}
<image list>
docker images
<container create>
docker run -i(interactive)t(pseudo-tty) -d(background) -p(hostport:containerport) hostport:containerport --name={name} image_name:tag
<container stop>
docker stop {name}docker stop {container_id}
<container start>
docker start {name}docker start {container_id}
<executing container process list>
docker ps
<total container list>
docker ps -a
<container connect>
docker exec -it {container_name} /bin/bash: exec는 실행중인 컨테이너에 접속, run은 컨테이너를 신규로 생성하여 실행
<file share:host->container>
docker cp {host_file_path} {container_name}:{container_file_path}
<file share:container->host>
docker cp {container_name}:{container_file_path} {host_file_path}
<container remove>
docker rm {name}docker rm {container_id}docker rm {container_id}, {container_id}
<image remove>
docker rmi {image_id}
<container and image remove>
docker rmi -f {image_id}
댓글을 달아 주세요
댓글 RSS 주소 : http://www.yongbi.net/rss/comment/883