Shell Dep [portable] Download
Docker layers are immutable. Downloading via curl inside a RUN command allows you to download, install, and clean up in a single layer, reducing image size.
#!/usr/bin/env bash set -euo pipefail CACHE_DIR="$CACHE_DIR:-./cache" mkdir -p "$CACHE_DIR" shell dep download
curl -sSL https://example.com/install.sh | sh Docker layers are immutable
echo "[INFO] Extracting to $INSTALL_DIR" sudo mkdir -p "$INSTALL_DIR" sudo tar -xzf "$FILENAME" -C "$INSTALL_DIR" --strip-components=1 shell dep download