Skip to content

Commit

Permalink
feat: add imagemagick bin
Browse files Browse the repository at this point in the history
  • Loading branch information
seantrane committed Nov 3, 2024
1 parent 9795cc0 commit 2a458e0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bin/imagemagick
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash
#
# Run ImageMagick as Docker Image
# https://github.com/dooman87/imagemagick-docker
# https://usage.imagemagick.org/basics/

export IMAGEMAGICK_IMAGE="${IMAGEMAGICK_IMAGE:-"dpokidov/imagemagick"}"
export IMAGEMAGICK_VERSION="${IMAGEMAGICK_VERSION:-"latest"}"

main() {
local OPTS=()
OPTS+=(--rm)
# [[ -z "$PS1" ]] && OPTS+=(-it)
OPTS+=(-v "$(pwd):/imgs")
docker run "${OPTS[@]}" "${IMAGEMAGICK_IMAGE}:${IMAGEMAGICK_VERSION}" "$@"
}

main "$@"

0 comments on commit 2a458e0

Please sign in to comment.