Skip to content

Instantly share code, notes, and snippets.

@starlocke
Created May 28, 2026 21:13
Show Gist options
  • Select an option

  • Save starlocke/4b366158726c59efcf711c19edcddfef to your computer and use it in GitHub Desktop.

Select an option

Save starlocke/4b366158726c59efcf711c19edcddfef to your computer and use it in GitHub Desktop.
Make SVGs using PlantUML's Docker Container
#!/bin/bash
# Determine which container engine to use
if command -v podman &> /dev/null; then
CONTAINER_ENGINE="podman"
elif command -v docker &> /dev/null; then
CONTAINER_ENGINE="docker"
else
echo "Error: Neither Podman nor Docker installed."
exit 1
fi
$CONTAINER_ENGINE run --rm -v "./:/app/" -w "/app" plantuml/plantuml --format svg $(find . -type f -name "*.puml" -maxdepth 1 -print0 | tr '\0' ' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment