CentOS7.6に1.13.1をインストールする方法

1.dockerとnet-toolsをインストールする
#sudo yum install docker net-tools

2.起動
#systemctl start docker
状態確認
# systemctl status docker
* docker.service – Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: active (running) since Fri 2018-12-28 10:29:27 JST; 8s ago
Docs: http://docs.docker.com
Main PID: 13134 (dockerd-current)

3.自動起動設定
# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.

4.CentOS7のイメージをダウンロードする
# docker pull centos:centos7
Trying to pull repository docker.io/library/centos …
centos7: Pulling from docker.io/library/centos
a02a4930cb5d: Pull complete
Digest: sha256:184e5f35598e333bfa7de10d8fb1cebb5ee4df5bc0f970bf2b1e7c7345136426
Status: Downloaded newer image for docker.io/centos:centos7

バージョン確認
# docker –version
Docker version 1.13.1, build 07f3374/1.13.1

5.dockerコンテナCFTを作成する
#docker run –privileged -d –name CFT centos:centos7 /sbin/init

6.コンテナにログインする
#docker exec -it CFT /bin/bash

Comments are closed.