Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Docker/Podman agnostic shell scripts

Script example

#!/bin/bash
if ! command -v podman &> /dev/null
then
    echo "podman could not be found. Falling back to docker"
    shopt -s expand_aliases
    alias podman='docker'
    alias podman-compose='docker-compose'
fi

echo "Running manuscript screening pods"
podman-compose -f docker-compose.yml up --abort-on-container-exit "$@"
podman-compose -f docker-compose.yml down

Usage

./start.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment