- Mac OS X에 직접 Docker를 설치할 수 없어서 VirtualBox와 boot2docker를 먼저 설치해야 함
준비 작업
VirtualBox
VirtualBox를 커맨드로 설치할 수 있음(brew cask)
brew install caskroom/cask/brew-cask
brew cask install virtualbox
docker
macOS나 Windows에서는 docker를 바로 실행할 수 없고 boot2docker를 이용해서 Linux를 얹고 거기서 실행해야 함
brew install docker
brew install boot2docker
boot2docker init
실행
boot2docker up
docker search centos
docker run -i -t centos /bin/bash
- centos 이미지를 다운로드하고 실행, 그 안에서 bash 실행
- -i -t 옵션은 터미설 설정임(interactive/tty)