+ install docker & setup dockge scripts
This commit is contained in:
22
install-docker.sh
Executable file
22
install-docker.sh
Executable file
@ -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
|
14
setup-dockge.sh
Executable file
14
setup-dockge.sh
Executable file
@ -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
|
Reference in New Issue
Block a user