Docker build #1

14
Docker 빌빌빌빌 #1 Boot2docker-cli 빌빌빌빌 SKPlanet Eric Ahn

Transcript of Docker build #1

Docker 빌드하기#1 Boot2docker-cli 살펴보기

SKPlanet Eric Ahn

boot2docker-cli features

VirutalBox Management ToolThis tool downloads the boot2docker ISO image, creates a VirtualBox virtual machine, sets up two networks for that virtual machine (one NAT to allow the VM and containers to access the internet, the other host-only to allow container port mapping to work securely), and then provides the user a simple way to login via SSH.

Source code : https://github.com/boot2docker/boot2docker-cli

boot2docker-cli => https://github.com/boot2docker/boot2docker 옮길 예정

docker

Boot2docker-cli

VirtualBoxVirtualBox

VBoxManager cli

virtualboxvs docker

Usage: boot2docker [<options>]

{

help|init|up|ssh|save|down|poweroff|reset|restart|config|status|info|ip|shellinit|delete|download|upgrade|version

}

[<args>]

Boot2docker & Virtualbox cli

boot2docker Virtualbox(VBoxManage) 설명

init createvm a new Boot2Docker VM

up/start/boot startvm Start VM from any states.

ssh Login to VM via SSH

save|suspend controlvm savestate Suspend VM and save state to disk

down|stop|halt Gracefully shutdown the VM

poweroff controlvm poweroff Forcefully power off the VM (may corrupt disk image).

reset controlvm reset Forcefully power cycle the VM (may corrupt disk image).

restart -- Gracefully reboot the VM.

config|cfg -- Show selected profile file settings

status A lot options Display current state of VM.

info A lot options Display detailed information of VM

ip A lot options Display the IP address of the VM's Host-only network

shellinit Pem & cert init Display the shell commands to set up the Docker client

delete|destroy unregistervm Delete Boot2Docker VM and its disk image

download Download Boot2Docker ISO image

upgrade Upgrade the Boot2Docker ISO image (restart if running)

version -v|--version Display version information

https://www.virtualbox.org/manual/ch08.html

Demo $ boot2docker init

$ boot2docker start

$ boot2docker delete

Source code 구조

Makefile Dockerfile

Main.go cmds.go config.go util.go

/driver/dummy/virtualbox

빌드Instruction set https://docs.docker.com/reference/builder/

source code

Source code ( lib )

$boot2ocker up cmdUp() review

$ make

Q&A