Docker use 32-bit centos image

拉取 32bit 镜像

1
docker pull i386/centos:centos6

替换 centos6 yum repo

1
2
3
sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -o /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo

使用 32bit repo

1
2
3
4
5
6
# arch --> x86_64
sed -i 's/\$arch/i686/g' /etc/yum.repos.d/*
sed -i 's/\$basearch/i386/g' /etc/yum.repos.d/*

yum clean all
yum makecache

更新 git -> git 2.x

1
2
3
4
5
6
7
8
9
10
# 32bit
wget http://opensource.wandisco.com/centos/6/git/i686/wandisco-git-release-6-1.noarch.rpm && rpm -ivh wandisco-git-release-6-1.noarch.rpm

# 64bit
wget http://opensource.wandisco.com/centos/6/git/x86_64/wandisco-git-release-6-1.noarch.rpm && rpm -ivh wandisco-git-release-6-1.noarch.rpm

# centos7 64bit
wget http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm && rpm -ivh wandisco-git-release-7-2.noarch.rpm

yum update git