canary/scripts/ruby

23 lines
589 B
Bash
Executable File

#!/bin/sh
# If we're executing from a normal shell, allow input. If we're in a
# subprocess, like under Jenkins Pipeline, don't allow it
tty --quiet
if [ $? -eq 0 ]; then
TTY_ARGS="-ti"
fi;
exec docker run --rm ${TTY_ARGS} \
-u $(id -u):$(id -g) \
-w ${PWD} \
-v ${PWD}:${PWD} \
-e HOME=$PWD \
-e LANG=C.UTF-8 \
-e GEM_HOME=${PWD}/vendor/gems \
-e BUNDLE_PATH=${PWD}/vendor/gems \
-e BUNDLE_APP_CONFIG=${PWD}/vendor/gems/.bundle \
-e BUNDLE_DISABLE_SHARED_GEMS=true \
-e SENTRY_API_TOKEN=$SENTRY_API_TOKEN \
-p 9292:9292 \
ruby:2.3 $@