VPS服务器相关我不是咕咕鸽
非大陆VPS
Ubuntu安装Docker和Docker-compose
更新、安装必备软件
apt-get update && apt-get install -y wget vim
非大陆 Docker 安装
wget -qO- get.docker.com | bash
查看版本
docker -v
开机自启
systemctl enable docker
安装docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
防止IPv6日志占满磁盘
cat > /etc/docker/daemon.json <<EOF
{
"log-driver": "json-file",
"log-opts": {
"max-size": "20m",
"max-file": "3"
},
"ipv6": true,
"fixed-cidr-v6": "fd00:dead:beef:c0::/80",
"experimental":true,
"ip6tables":true
}
EOF
重启docker
systemctl restart docker