commit 6f89c496f4c101774c15d0f6f1e3a8670bfc327d Author: WSL Winda Date: Sun Feb 16 20:02:59 2025 +0300 + install docker & setup dockge scripts diff --git a/install-docker.sh b/install-docker.sh new file mode 100755 index 0000000..3591c47 --- /dev/null +++ b/install-docker.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e +SERVER=$1 +if [[ -z "${SERVER}" ]]; then echo 'No SERVER'; exit 1; fi + +#https://docs.docker.com/engine/install/debian/ + +ssh root@${SERVER} bash -- << EOF +set -e +apt update -qq +apt-get install ca-certificates curl -qq +install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc +chmod a+r /etc/apt/keyrings/docker.asc +echo \ + "deb [arch=\$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \ + \$(. /etc/os-release && echo "\$VERSION_CODENAME") stable" | \ + tee /etc/apt/sources.list.d/docker.list > /dev/null +apt update -qq +apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -qq +docker run hello-world +EOF \ No newline at end of file diff --git a/setup-dockge.sh b/setup-dockge.sh new file mode 100755 index 0000000..52e9fbc --- /dev/null +++ b/setup-dockge.sh @@ -0,0 +1,14 @@ +#!/bin/bash +set -e +SERVER=$1 +if [[ -z "${SERVER}" ]]; then echo 'No SERVER'; exit 1; fi + +#https://github.com/louislam/dockge?tab=readme-ov-file#basic + +ssh root@${SERVER} bash -- << EOF +set -e +mkdir -p /opt/stacks /opt/dockge +cd /opt/dockge +curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output compose.yaml +docker compose up -d +EOF \ No newline at end of file