24 lines
666 B
Bash
24 lines
666 B
Bash
|
#!/bin/bash
|
||
|
|
||
|
swapoff -a
|
||
|
sed -i "/swap/d" /etc/fstab
|
||
|
|
||
|
apt remove -y iptables-persistent
|
||
|
apt autoremove -y
|
||
|
apt install -y ca-certificates curl gnupg lsb-release
|
||
|
|
||
|
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||
|
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian bullseye stable" > /etc/apt/sources.list.d/docker.list
|
||
|
|
||
|
sysctl -w net/netfilter/nf_conntrack_max=131072
|
||
|
|
||
|
apt update
|
||
|
apt dist-upgrade
|
||
|
apt install -y docker-ce
|
||
|
apt install -y docker-compose
|
||
|
|
||
|
systemctl enable docker.service
|
||
|
systemctl start docker.service
|
||
|
|
||
|
sleep 3
|