---移除非官方Docker--- sudo apt-get remove docker docker-enginedocker.io containerd runc ---安裝相關工具包--- sudo apt-get update sudo apt-get install -y ca-certificatescurl gnupg lsb-release echo "deb [arch=$(dpkg--print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg]https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudotee /etc/apt/sources.list.d/docker.list > /dev/null ---開始安裝Docker--- sudo apt-get update sudo apt-get install -y docker-cedocker-ce-cli containerd.io docker-compose-plugin ---將目前使用者加入Docker群組--- sudo usermod -aG docker $(whoami) ---測試安裝結果--- sudo docker run hello-world 開權限 sudo chmod 777/var/run/docker.sock
---測試安裝wg-easy--- docker run -d \ --name=wg-easy \ -e LANG=cht \ -e WG_HOST=120.234.130.133 \ -e PASSWORD=zsnxxnmz \ -e WG_DEFAULT_DNS=120.196.165.24,211.136.192.6 \ -v ~/.wg-easy:/etc/wireguard \ -p 51820:51820/udp \ -p 51821:51821/tcp \ --cap-add=NET_ADMIN \ --cap-add=SYS_MODULE \ --sysctl="net.ipv4.conf.all.src_valid_mark=1"\ --sysctl="net.ipv4.ip_forward=1"\ --restart unless-stopped \ ghcr.io/wg-easy/wg-easy
|