u/cholz

My first visitor this year

I usually see only females so I'm pretty excited to see this fella.

u/cholz — 3 days ago
▲ 1 r/unRAID

If you're like me and like managing your compose stacks "manually" and just want docker compose and nothing else the well known plugins bring along it's actually quite simple.

Make a file like /boot/config/install-docker-compose.sh with the following content

#!/bin/bash
# Add to /boot/config/go (or source from it)
# Installs Docker Compose CLI plugin on every boot

COMPOSE_VERSION="5.1.3"
COMPOSE_DIR="/usr/lib/docker/cli-plugins"
COMPOSE_BIN="${COMPOSE_DIR}/docker-compose"
COMPOSE_CACHE="/boot/config/docker-compose-${COMPOSE_VERSION}"

mkdir -p "${COMPOSE_DIR}"

# Download once to the flash drive (persists across reboots),
# then copy into the RAM-based rootfs each boot
if [ ! -f "${COMPOSE_CACHE}" ]; then
    echo "Downloading Docker Compose v${COMPOSE_VERSION}..."
    COMPOSE_URL="https://github.com/docker/compose/releases/download/v${COMPOSE_VERSION}/docker-compose-linux-x86_64"
    curl -sL "${COMPOSE_URL}" -o "${COMPOSE_CACHE}"
fi

cp "${COMPOSE_CACHE}" "${COMPOSE_BIN}"
chmod +x "${COMPOSE_BIN}"

Then add a line like

bash /boot/config/install-docker-compose.sh

to your /boot/config/go file and bingo you've got docker compose.

reddit.com
u/cholz — 21 days ago