LoginSignup
4
4

More than 5 years have passed since last update.

Macでvagrant+VirtualBox+CentOS/Atomic-host+docker+ubuntu環境メモ

Last updated at Posted at 2016-01-20

タイトルの環境を作る時の手順メモです。

vagrantを入れる

公式サイトからvagrantを落としてきてインストール

VirtualBoxを入れる

同じく公式サイトからVirtualBoxを落としてきてインストール

vagrant initする

以下コマンドでvagrant上でatomic-host起動

vagrant init centos/atomic-host && vagrant up --provider virtual box

ssh接続してdockerにubuntuのコンテナを作る

vagrat sshして、

$ vagrant ssh

これでatomic-hostにつながるので、
docker pullする。

[vagrant@localhost ~]$ sudo docker pull ubuntu:latest

そしてdockerコンテナ起動する。

[vagrant@localhost ~]$ sudo docker run -i -t ubuntu:latest /bin/bash

あとは必要に応じてVirtualBoxのポートフォワード設定すればいい感じ!

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4