docker:add_new_container

sudo docker run -i -t -d --name [container name] -v [host directory]:[docker directory] -p [host port]:[docker port] --net [subnet name] --ip [docker ip] -h [docker hostname] [imagename] /bin/bash /bin/start_sub.sh
sudo docker network create --subnet=[network]/[subnetmask] [subname name]
ex) sudo docker network create --subnet=172.18.0.0/16 mynet

start 16.04

sudo docker run -i -t -d --name builder_16.04 -v /home/kjkim/storage_docker:/home/kjkim/storage_docker -p 1622:22 -h KKJBUILDER ef69646d4ef8 /bin/bash /bin/start_sub.sh

start 14.04

sudo docker run -i -t -d --name builder_14.04 -v /home/kjkim/storage_docker:/home/kjkim/storage_docker -h KKJBUILDER -p 1422:22 2a6e2efe670d /bin/bash /bin/start_sub.sh
  • docker/add_new_container.txt
  • 마지막으로 수정됨: 2020/09/26 02:12
  • (바깥 편집)