Basic Docker Commands :: 2021/04/19 22:14

<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}

2021/04/19 22:14 2021/04/19 22:14
Trackback Address :: http://www.yongbi.net/trackback/883
[로그인][오픈아이디란?]
오픈아이디로만 댓글을 남길 수 있습니다
Name
Password
Homepage

Secret
< PREV |  1  |  2  |  3  |  4  |  5  |  6  |  7  |  ...  640  |  NEXT >