Skip to content

Instantly share code, notes, and snippets.

@zachcp
Created May 6, 2019 18:46
Show Gist options
  • Select an option

  • Save zachcp/7b5fa4286a5e6f3b08fe638bac4cc5fb to your computer and use it in GitHub Desktop.

Select an option

Save zachcp/7b5fa4286a5e6f3b08fe638bac4cc5fb to your computer and use it in GitHub Desktop.
Run AS5 RC in Docker
#!/bin/bash
set -o errexit
set -o nounset
# handle input file
readonly INPUT_FILE=$(basename $1)
readonly INPUT_DIR=$(dirname $(readlink -f $1))
shift
# handle output file
readonly OUTPUT_DIR=$(readlink -f $1)
shift
# Links within the container
readonly CONTAINER_SRC_DIR=/input
readonly CONTAINER_DST_DIR=/output
readonly CONTAINER_DB_DIR=/databases
if [ ! -d ${OUTPUT_DIR} ]; then
mkdir -p ${OUTPUT_DIR}
fi
docker run \
--volume ${INPUT_DIR}:${CONTAINER_SRC_DIR}:ro \
--volume ${OUTPUT_DIR}:${CONTAINER_DST_DIR}:rw \
--detach=false \
--rm \
--user=$(id -u):$(id -g) \
antismash/standalone:5.0.0rc1 \
${INPUT_FILE} \
$@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment