4
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CentOS6.10 に docker をインストールするまで (2021年版)

Last updated at Posted at 2021-03-07

kickstart で CentOS6.10をインストールする時のハマりポイント

  • Escapeキーを押してlinux ks
  • kickstartでエラーになる場合、以下のようにbaseurlを修正するとよい。
kickstart.ks
- repo --name="CentOS"  --baseurl=cdrom:sr0 --cost=100
+ repo --name="CentOS"  --baseurl=file:///mnt/source/ --cost=100

リポジトリをVaultに切り替え

vaultに切り替え
sed -i \
 -e "s/^mirrorlist=http:\/\/mirrorlist.centos.org/#mirrorlist=http:\/\/mirrorlist.centos.org/g" \
 -e "s/^#baseurl=http:\/\/mirror.centos.org/baseurl=http:\/\/vault.centos.org/g" \
 /etc/yum.repos.d/CentOS-Base.repo

dockerのインストール

dockerのインストール
curl -o docker-engine-1.7.1-1.el6.x86_64.rpm \
  "https://get.docker.com/rpm/1.7.1/centos-6/RPMS/x86_64/docker-engine-1.7.1-1.el6.x86_64.rpm"

yum localinstall -y "docker-engine-1.7.1-1.el6.x86_64.rpm"

dockerをOS起動時に起動

chkconfig docker on
# dockerグループに追加
usermod -aG docker $SUDO_USER

docker-compose

# docker-compose 1.5.2 (CentOS6でサポートされている最終バージョン)
wget "https://github.com/docker/compose/releases/download/1.5.2/docker-compose-Linux-x86_64"
mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
  • reboot

起動確認

docker run -it --rm -p 8080:80 nginx:alpine
4
3
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
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?