#!/bin/sh

install -m 0755 -d /etc/apt/keyrings
wget https://download.docker.com/linux/debian/gpg -O /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc

tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/debian
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF

apt update
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

tee /etc/docker/daemon.json <<EOF
{
    "log-opts": {
        "max-file": "5",
        "max-size": "10m"
    },
    "iptables": false,
    "ip6tables": false,
    "bridge": "none"
}
EOF
