安装docker-compose

docker安装
Docker 支持 64 位版本 CentOS 7/8,并且要求内核版本不低于 3.10。 CentOS 7 满足最低内核的要求
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
sudo sed -i 's/download.docker.com/mirrors.aliyun.com\/docker-ce/g' /etc/yum.repos.d/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io

#官方源
#sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

启动 Docker
sudo systemctl enable docker
sudo systemctl start docker

测试 Docker 是否安装正确
docker run --rm hello-world
docker --version

参考资料

安装docker-compose 建议装1.17.1或者以下的, 我装1.2X.X的glibc版本不够,很麻烦的
sudo curl -L "https://github.com/docker/compose/releases/download/1.17.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

测试是否安装成功:
docker-compose --version

参考资料

以下其他问题关于glibc版本问题

version `GLIBC_2.17' not found (required by /tmp/_MEI7Hk2yJ/libpython3.6m.so.1.0)
sudo curl -L --fail https://github.com/docker/compose/releases/download/1.28.0/run.sh -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
/usr/local/bin/docker-compose -v
执行docker-compose -V报错及升级后报/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28‘ not found问题解决记录

参考资料


GLIBC_2.14' not found

strings /lib64/libc.so.6 | grep GLIBC
wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.14.tar.gz
tar -xzvf glibc-2.14.tar.gz
cd glibc-2.14
mkdir build
cd build 
../configure --prefix=/opt/glibc-2.14
make
make localedata/install-locales
上边这一条必须也要执行,否则时区等设置会有问题
make install
mv libc.so.6 libc.so.6_back
export LD_PRELOAD=/opt/glibc-2.14/lib/libc-2.14.so 
ln -s /opt/glibc-2.14/lib/libc-2.14.so /lib64/libc.so.6


如果报错
ln: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory
export LD_PRELOAD="/opt/glibc-2.14/lib/libc-2.14.so"

https://blog.csdn.net/myhes/article/details/106923039
http://www.hongxuejing.com/linux/glibc2.1.4-92.html
https://blog.csdn.net/weixin_44731100/article/details/103686276


configure: error: no acceptable C compiler found in $PATH
yum install gcc

https://blog.csdn.net/duguduchong/article/details/8699774

ln: error while loading shared libraries: __vdso_time: invalid mode for dlopen(): Invalid argument

升级GLIBC至2.14及系统崩溃解决方案

https://blog.csdn.net/Mcharleylei/article/details/98034825


 

上一篇:pwndocker的坑点收集


下一篇:【pwn】2021 绿城杯(部分)