CentOS 7ではDockerをフル機能で利用することが可能です。
EPELレポジトリを有効にする
DockerはEPELレポジトリに含まれています。CentOS 7用のEPELレポジトリは現在ベータながら、すでに用意されています。
インストールするコマンドは次の通りです。
$ sudo yum install http://linux.mirrors.es.net/fedora-epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm
Dockerをインストールする
Dockerのパッケージ名は、docker-ioです。これをyumでインストールします。
$ sudo yum install docker-io
インストールした後に、サービスとして起動させるには systemctl start、ブート時に自動的にサービスを起動させるには systemctl enable を使います。
$ sudo systemctl start docker.service $ sudo systemctl enable docker.service
これでDockerが利用できる状態になりました。 docker version で確認できます。
$ docker version Client version: 1.0.0 Client API version: 1.12 Go version (client): go1.2.2 Git commit (client): 63fe64c/1.0.0 Server version: 1.0.0 Server API version: 1.12 Go version (server): go1.2.2 Git commit (server): 63fe64c/1.0.0
また、docker infoで、device mapperを利用していることが確認できます。
$ docker info Containers: 3 Images: 1 Storage Driver: devicemapper Pool Name: docker-253:1-23349-pool Data file: /var/lib/docker/devicemapper/devicemapper/data Metadata file: /var/lib/docker/devicemapper/devicemapper/metadata Data Space Used: 465.8 Mb Data Space Total: 102400.0 Mb Metadata Space Used: 0.9 Mb Metadata Space Total: 2048.0 Mb Execution Driver: native-0.2 Kernel Version: 3.10.0-123.el7.x86_64
以上で、CentOS 7上でDockerを利用できる状態になりました。
参考: インストールのログ
参考のために、Dockerをインストールした時の進み方を貼り付けておきます。
[yuryu@centos7 ~]$ sudo yum install http://linux.mirrors.es.net/fedora-epel/beta/7/x86_64/epel-release-7-0.2.noarch.rpm Loaded plugins: fastestmirror epel-release-7-0.2.noarch.rpm | 13 kB 00:00:00 Examining /var/tmp/yum-root-0OMCgR/epel-release-7-0.2.noarch.rpm: epel-release-7-0.2.noarch Marking /var/tmp/yum-root-0OMCgR/epel-release-7-0.2.noarch.rpm to be installed Resolving Dependencies --> Running transaction check ---> Package epel-release.noarch 0:7-0.2 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================== Package Arch Version Repository Size ======================================================================================================================== Installing: epel-release noarch 7-0.2 /epel-release-7-0.2.noarch 22 k Transaction Summary ======================================================================================================================== Install 1 Package Total size: 22 k Installed size: 22 k Is this ok [y/d/N]: y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : epel-release-7-0.2.noarch 1/1 Verifying : epel-release-7-0.2.noarch 1/1 Installed: epel-release.noarch 0:7-0.2 Complete! [yuryu@centos7 ~]$ sudo yum install docker-io Loaded plugins: fastestmirror base | 3.6 kB 00:00:00 epel/x86_64/metalink | 13 kB 00:00:00 epel | 3.7 kB 00:00:00 extras | 2.9 kB 00:00:00 updates | 2.9 kB 00:00:00 (1/2): epel/x86_64/group_gz | 163 kB 00:00:01 (2/2): epel/x86_64/primary_db | 2.0 MB 00:00:47 Loading mirror speeds from cached hostfile * base: centos-distro.cavecreek.net * epel: linux.mirrors.es.net * extras: centos-distro.cavecreek.net * updates: mirror.supremebytes.com Resolving Dependencies --> Running transaction check ---> Package docker-io.x86_64 0:1.0.0-1.el7 will be installed --> Finished Dependency Resolution Dependencies Resolved ======================================================================================================================== Package Arch Version Repository Size ======================================================================================================================== Installing: docker-io x86_64 1.0.0-1.el7 epel 4.5 M Transaction Summary ======================================================================================================================== Install 1 Package Total download size: 4.5 M Installed size: 23 M Is this ok [y/d/N]: y Downloading packages: docker-io-1.0.0-1.el7.x86_64.rpm | 4.5 MB 00:02:39 Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : docker-io-1.0.0-1.el7.x86_64 1/1 Verifying : docker-io-1.0.0-1.el7.x86_64 1/1 Installed: docker-io.x86_64 0:1.0.0-1.el7 Complete! [yuryu@centos7 ~]$ sudo systemctl start docker.service [yuryu@centos7 ~]$ sudo systemctl enable docker.service ln -s '/usr/lib/systemd/system/docker.service' '/etc/systemd/system/multi-user.target.wants/docker.service'
About the package name, it's docker than docker-io
返信削除docker-ioでインストールすると失敗しました。
返信削除dockerだとうまくいったのですが、docker.x86_64 0:0.11.1-22.el7.centosだったので、バージョンが古いようです。
レポジトリのところで、epel-release-7-1.noarch.rpm に変わっていて、これがよくないのかもしれません。
Thank you for your very nice article, do not forget to read my articles also Kata Kata Remaja and many other interesting articles on my blog that.
返信削除놀이터는 유수의 Doge7casino 놀이터인 거대 해머에 우리카지노가입 의해 정기적으로 확인되며, 저희 웹사이트에서 안전하게 작업할 수 있습니다. 분산형과는 반대로 도박을 하면 또는 분산형 선택이라고 불리는 일종의 옵션을 사용할 수 있습니다. 10달러는 성공하지만 팀 점수가 분배에 집중되면 11달러 도박으로 성공합니다. 이것은 웹의 물리 활동 매뉴얼에 관한 것이 이익을 내는 또 다른 방법일 수 있습니다.
返信削除