Sha256: 3a1c25d1dfeb2c7e79706e3af7fc5cd0676c9e6b9a2137b42f421c584e9843a7

Contents?: true

Size: 1.56 KB

Versions: 5

Compression:

Stored size: 1.56 KB

Contents

#!/usr/bin/env bash
set -euo pipefail

APP_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
APP_DIR=${APP_SCRIPT_DIR%/script}
cd $APP_DIR

while getopts ":v:" opt; do
  case $opt in
    v)
      APP_RUBY_VERSION=$OPTARG
      ;;
    \?)
      echo "Invalid option: -$OPTARG" >&2
      exit 1
      ;;
    :)
      echo "Option -$OPTARG requires an argument." >&2
      exit 1
      ;;
  esac
done

echo "== Building Ruby app images... =="
if [ -v APP_RUBY_VERSION ]; then
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-$APP_RUBY_VERSION -t datadog/dd-apm-demo:rb-$APP_RUBY_VERSION-ruby .
else
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.0 -t datadog/dd-apm-demo:rb-2.0-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.1 -t datadog/dd-apm-demo:rb-2.1-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.2 -t datadog/dd-apm-demo:rb-2.2-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.3 -t datadog/dd-apm-demo:rb-2.3-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.4 -t datadog/dd-apm-demo:rb-2.4-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.5 -t datadog/dd-apm-demo:rb-2.5-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.6 -t datadog/dd-apm-demo:rb-2.6-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-2.7 -t datadog/dd-apm-demo:rb-2.7-ruby .
  docker build --build-arg BASE_IMAGE=datadog/dd-apm-demo:rb-3.0 -t datadog/dd-apm-demo:rb-3.0-ruby .
fi
echo "== Done building Ruby app images. =="

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddtrace-0.51.1 integration/apps/ruby/script/build-images
ddtrace-0.51.0 integration/apps/ruby/script/build-images
ddtrace-0.50.0 integration/apps/ruby/script/build-images
ddtrace-0.49.0 integration/apps/ruby/script/build-images
ddtrace-0.48.0 integration/apps/ruby/script/build-images