LoginSignup
2
2

More than 5 years have passed since last update.

MacのVagrantのCentOS6にDockerをインストールしてみた

Posted at

今回はMacのVagrantのCentOS6にDockerをインストールしてみます

CentOSにyumを使ったDockerのインストール

vagrant上で下記コマンドを実行します

[vagrant@localhost ~]$ rpm -Uvh http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
[vagrant@localhost ~]$ yum -y install docker-io
[vagrant@localhost ~]$ sudo /etc/init.d/docker start

Docker コンテナ内のバージョン確認

コンテナ内のCentOSのバージョンは7なんですね。

[vagrant@localhost ~]$ sudo docker run centos cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core) 

Docker コンテナ内でシェルを起動する

[vagrant@localhost ~]$ sudo docker run -i -t centos /bin/bash
[root@f09e39c3e51d /]#

次回はDockerのコンテナをいろいろ弄ってみたいと思います。

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