os-init/debian-12/apps/docker/docker.sh

24 lines
666 B
Bash
Raw Permalink Normal View History

2023-11-19 21:25:32 +00:00
#!/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