diff --git a/.circleci/config.yml b/.circleci/config.yml index b8abf058cd7..83db04cd3e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -204,9 +204,9 @@ orbs: - *step_compute_bundle_checksum - restore_cache: keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}- - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}- + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }} - *check_exact_bundle_cache_hit - *step_bundle_install - when: @@ -226,7 +226,7 @@ orbs: paths: - /app - save_cache: - key: bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + key: bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} paths: - /usr/local/bundle build_and_test_integration: @@ -278,7 +278,7 @@ orbs: - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - restore_cache: keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - run: name: Set coverage report directory command: | @@ -323,7 +323,7 @@ orbs: - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - restore_cache: keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - run: name: Run Benchmark command: bundle exec appraisal rails5-postgres-sidekiq ruby benchmarks/sidekiq_test.rb 2>&1 1> /dev/null | tee benchmark_results.csv @@ -338,7 +338,7 @@ orbs: - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - restore_cache: keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - *step_rubocop sorbet_type_checker: <<: *test_job_default @@ -348,7 +348,7 @@ orbs: - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - restore_cache: keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - *step_sorbet_type_checker coverage: <<: *test_job_default @@ -358,7 +358,7 @@ orbs: - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - restore_cache: keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - attach_workspace: at: /tmp/workspace - run: @@ -381,7 +381,7 @@ orbs: - '{{ .Environment.CIRCLE_CACHE_VERSION }}-bundled-repo-<>-{{ .Environment.CIRCLE_SHA1 }}' - restore_cache: keys: - - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} + - bundle-{{ .Environment.CIRCLE_CACHE_VERSION }}-{{ checksum ".circleci/images/primary/binary_version" }}-<>-{{ checksum "lib/ddtrace/version.rb" }}-{{ .Branch }}-{{ checksum ".circleci/bundle_checksum" }} - attach_workspace: at: /tmp/workspace - run: @@ -419,7 +419,7 @@ jobs: docker: - environment: *container_base_environment - image: ivoanjo/docker-library:ddtrace_rb_2_5_9 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.5.9-dd resource_class: small steps: - checkout @@ -441,7 +441,7 @@ jobs: docker: - environment: *container_base_environment - image: ivoanjo/docker-library:ddtrace_rb_2_5_9 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.5.9-dd resource_class: small steps: - run: @@ -480,37 +480,37 @@ job_configuration: - &config-2_1 <<: *filters_all_branches_and_tags ruby_version: '2.1' - image: ivoanjo/docker-library:ddtrace_rb_2_1_10 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.1.10-dd resource_class_to_use: medium+ - &config-2_2 <<: *filters_all_branches_and_tags ruby_version: '2.2' - image: ivoanjo/docker-library:ddtrace_rb_2_2_10 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.2.10-dd resource_class_to_use: medium+ - &config-2_3 <<: *filters_all_branches_and_tags ruby_version: '2.3' - image: ivoanjo/docker-library:ddtrace_rb_2_3_8 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.3.8-dd resource_class_to_use: medium+ - &config-2_4 <<: *filters_all_branches_and_tags ruby_version: '2.4' - image: ivoanjo/docker-library:ddtrace_rb_2_4_10 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.4.10-dd resource_class_to_use: medium+ - &config-2_5 <<: *filters_all_branches_and_tags ruby_version: '2.5' - image: ivoanjo/docker-library:ddtrace_rb_2_5_9 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.5.9-dd resource_class_to_use: medium+ - &config-2_6 <<: *filters_all_branches_and_tags ruby_version: '2.6' - image: ivoanjo/docker-library:ddtrace_rb_2_6_7 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.6.7-dd resource_class_to_use: medium+ - &config-2_7 <<: *filters_all_branches_and_tags ruby_version: '2.7' - image: ivoanjo/docker-library:ddtrace_rb_2_7_3 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.7.3-dd resource_class_to_use: medium+ - &config-2_7-small <<: *config-2_7 @@ -518,38 +518,38 @@ job_configuration: - &config-3_0 <<: *filters_all_branches_and_tags ruby_version: '3.0' - image: ivoanjo/docker-library:ddtrace_rb_3_0_3 + image: ghcr.io/datadog/dd-trace-rb/ruby:3.0.3-dd resource_class_to_use: medium+ - &config-3_1 <<: *filters_all_branches_and_tags ruby_version: '3.1' - image: ivoanjo/docker-library:ddtrace_rb_3_1_1 + image: ghcr.io/datadog/dd-trace-rb/ruby:3.1.1-dd resource_class_to_use: medium+ - &config-3_2 <<: *filters_all_branches_and_tags ruby_version: '3.2' - image: ivoanjo/docker-library:ddtrace_rb_3_2_0_preview2 + image: ghcr.io/datadog/dd-trace-rb/ruby:3.2.0-preview2-dd resource_class_to_use: medium+ # ADD NEW RUBIES HERE - &config-jruby-9_2_8_0 # Test with older 9.2 release because 9.2.9.0 changed behavior, see https://github.com/DataDog/dd-trace-rb/pull/1409 <<: *filters_all_branches_and_tags ruby_version: 'jruby-9.2.8.0' - image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_8_0 + image: ghcr.io/datadog/dd-trace-rb/jruby:9.2.8.0-dd resource_class_to_use: medium+ - &config-jruby-9_2-latest # More recent release of 9.2 <<: *filters_all_branches_and_tags ruby_version: 'jruby-9.2-latest' - image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_18_0 + image: ghcr.io/datadog/dd-trace-rb/jruby:9.2.18.0-dd resource_class_to_use: medium+ - &config-jruby-9_3-latest <<: *filters_all_branches_and_tags ruby_version: 'jruby-9.3-latest' - image: ivoanjo/docker-library:ddtrace_rb_jruby_9_3_4_0 + image: ghcr.io/datadog/dd-trace-rb/jruby:9.3.4.0-dd resource_class_to_use: medium+ - - &config-truffleruby-21_0_0 + - &config-truffleruby-22_0_0 <<: *filters_all_branches_and_tags - ruby_version: 'truffleruby-21.0.0' - image: ivoanjo/docker-library:ddtrace_rb_truffleruby_21_0_0 + ruby_version: 'truffleruby-22.0.0' + image: ghcr.io/datadog/dd-trace-rb/truffleruby:22.3.0-dd resource_class_to_use: medium+ workflows: @@ -585,7 +585,7 @@ workflows: - test-jruby-9.2.8.0 - test-jruby-9.2-latest - test-jruby-9.3-latest - # soon™️ - test-truffleruby-21.0.0 + # soon™️ - test-truffleruby-22.0.0 - orb/changelog: <<: *config-2_7-small name: changelog @@ -762,13 +762,13 @@ workflows: # TruffleRuby # soon™️ # - orb/build: - # <<: *config-truffleruby-21_0_0 - # name: build-truffleruby-21.0.0 + # <<: *config-truffleruby-22_0_0 + # name: build-truffleruby-22.0.0 # - orb/test: - # <<: *config-truffleruby-21_0_0 - # name: test-truffleruby-21.0.0 + # <<: *config-truffleruby-22_0_0 + # name: test-truffleruby-22.0.0 # requires: - # - build-truffleruby-21.0.0 + # - build-truffleruby-22.0.0 # Release jobs - "deploy prerelease Gem": <<: *filters_all_branches_and_tags @@ -790,7 +790,7 @@ workflows: - test-jruby-9.2.8.0 - test-jruby-9.2-latest - test-jruby-9.3-latest - # soon™️ - test-truffleruby-21.0.0 + # soon™️ - test-truffleruby-22.0.0 - "deploy release": <<: *filters_only_release_tags requires: @@ -811,7 +811,7 @@ workflows: - test-jruby-9.2.8.0 - test-jruby-9.2-latest - test-jruby-9.3-latest - # soon™️ - test-truffleruby-21.0.0 + # soon™️ - test-truffleruby-22.0.0 # This workflow runs the same `build` and `test` jobs as above on a schedule. # Tasks related to housekeeping (e.g. prerelease) are not relevant # to this daily check, as they are not expected to be impacted here. @@ -1003,11 +1003,11 @@ workflows: # TruffleRuby # soon™️ # - orb/build: - # <<: *config-truffleruby-21_0_0 - # name: build-truffleruby-21.0.0 + # <<: *config-truffleruby-22_0_0 + # name: build-truffleruby-22.0.0 # edge: true # - orb/test: - # <<: *config-truffleruby-21_0_0 - # name: test-truffleruby-21.0.0 + # <<: *config-truffleruby-22_0_0 + # name: test-truffleruby-22.0.0 # requires: - # - build-truffleruby-21.0.0 + # - build-truffleruby-22.0.0 diff --git a/.circleci/images/primary/Dockerfile-2.1.10 b/.circleci/images/primary/Dockerfile-2.1.10 index ca74fd77861..f32045f586c 100644 --- a/.circleci/images/primary/Dockerfile-2.1.10 +++ b/.circleci/images/primary/Dockerfile-2.1.10 @@ -1,9 +1,90 @@ -# Last version: https://github.com/docker-library/ruby/blob/99def14400fcd612782367830836dfcbc10c8c50/2.1/Dockerfile -FROM ruby:2.1.10 +# ruby:2.1.10 was based on jessie, but never got a aarch64 image +# aarch64 used to be supported upon release but is not part of LTS, so archive.debian.org does not contain aarch64: https://www.debian.org/releases/jessie/ -# Add Jessie repos -# Fixes https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease -RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list +# taken from https://github.com/docker-library/ruby/blob/c5693b25aa865489fee130e572a3f11bccebd21b/2.1/Dockerfile +FROM buildpack-deps:stretch AS ruby-2.1.10-stretch + +# skip installing gem documentation +RUN mkdir -p /usr/local/etc \ + && { \ + echo 'install: --no-document'; \ + echo 'update: --no-document'; \ + } >> /usr/local/etc/gemrc + +ENV RUBY_MAJOR 2.1 +ENV RUBY_VERSION 2.1.10 +ENV RUBY_DOWNLOAD_SHA256 5be9f8d5d29d252cd7f969ab7550e31bbb001feb4a83532301c0dd3b5006e148 +# TODO: update only once +ENV RUBYGEMS_VERSION 2.6.12 + +# some of ruby's build scripts are written in ruby +# we purge system ruby later to make sure our final image uses what we just built +RUN set -ex \ + \ + && buildDeps=' \ + bison \ + dpkg-dev \ + libgdbm-dev \ + # ruby 2.3 on stretch can only support libssl1.0-dev (libssl dev from buildpack-deps is 1.1.x) + libssl1.0-dev \ + ruby \ + ' \ + && apt-get update \ + && apt-get install -y --no-install-recommends $buildDeps \ + && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \ + \ + && mkdir -p /usr/src/ruby \ + && tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.xz \ + \ + && cd /usr/src/ruby \ + \ +# hack in "ENABLE_PATH_CHECK" disabling to suppress: +# warning: Insecure world writable dir + && { \ + echo '#define ENABLE_PATH_CHECK 0'; \ + echo; \ + cat file.c; \ + } > file.c.new \ + && mv file.c.new file.c \ + \ + && autoconf \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --enable-shared \ + && make -j "$(nproc)" \ + && make install \ + \ + && apt-get purge -y --auto-remove $buildDeps \ + && cd / \ + && rm -r /usr/src/ruby \ + \ + && gem update --system "$RUBYGEMS_VERSION" + +# TODO: update only once +ENV BUNDLER_VERSION 1.15.1 + +RUN gem install bundler --version "$BUNDLER_VERSION" + +# install things globally, for great justice +# and don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_PATH="$GEM_HOME" \ + BUNDLE_BIN="$GEM_HOME/bin" \ + BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $BUNDLE_BIN:$PATH +RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ + && chmod 777 "$GEM_HOME" "$BUNDLE_BIN" + +CMD [ "irb" ] + +FROM ruby-2.1.10-stretch # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -19,7 +100,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -30,16 +111,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -50,27 +125,16 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ - && chmod +x /usr/bin/docker-compose \ - && docker-compose version +# Releases over there don't work as they need a more recent glibc than Stretch has: https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51 +# So we fall back to using stretch-backports which has 1.21 +RUN echo 'deb http://ftp.debian.org/debian stretch-backports main\ndeb-src http://ftp.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports.list \ + && apt-get update \ + && apt-get install -y docker-compose \ + && docker-compose version \ + && rm -rf /var/lib/apt/lists/* # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip" \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system 2.7.9 diff --git a/.circleci/images/primary/Dockerfile-2.2.10 b/.circleci/images/primary/Dockerfile-2.2.10 index b659cff9342..df1f6d90f7c 100644 --- a/.circleci/images/primary/Dockerfile-2.2.10 +++ b/.circleci/images/primary/Dockerfile-2.2.10 @@ -1,9 +1,90 @@ -# Last version: https://github.com/docker-library/ruby/blob/395cce4eba52917eb9a40c72d50703a1ce9e1acd/2.2/jessie/Dockerfile -FROM ruby:2.2.10 +# ruby:2.2.10-jessie was based on jessie, and had a aarch64 image +# aarch64 used to be supported upon release but is not part of LTS, +# so archive.debian.org does not contain aarch64: https://www.debian.org/releases/jessie/ +# +# taken from https://github.com/docker-library/ruby/blob/b5ef401d348ca9b1d9f6a5cb4b25f32bf013daca/2.2/jessie/Dockerfile +FROM buildpack-deps:stretch AS ruby-2.2.10-stretch -# Add Jessie repos -# Fixes https://superuser.com/questions/1423486/issue-with-fetching-http-deb-debian-org-debian-dists-jessie-updates-inrelease -RUN printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list +# skip installing gem documentation +RUN mkdir -p /usr/local/etc \ + && { \ + echo 'install: --no-document'; \ + echo 'update: --no-document'; \ + } >> /usr/local/etc/gemrc + +ENV RUBY_MAJOR 2.2 +ENV RUBY_VERSION 2.2.10 +ENV RUBY_DOWNLOAD_SHA256 bf77bcb7e6666ccae8d0882ea12b05f382f963f0a9a5285a328760c06a9ab650 +# TODO: update only once +ENV RUBYGEMS_VERSION 2.7.7 +# TODO: update only once +ENV BUNDLER_VERSION 1.16.2 + +# some of ruby's build scripts are written in ruby +# we purge system ruby later to make sure our final image uses what we just built +RUN set -ex \ + \ + && buildDeps=' \ + bison \ + dpkg-dev \ + libgdbm-dev \ + # ruby 2.3 on stretch can only support libssl1.0-dev (libssl dev from buildpack-deps is 1.1.x) + libssl1.0-dev \ + ruby \ + ' \ + && apt-get update \ + && apt-get install -y --no-install-recommends $buildDeps \ + && rm -rf /var/lib/apt/lists/* \ + \ + && wget -O ruby.tar.xz "https://cache.ruby-lang.org/pub/ruby/${RUBY_MAJOR%-rc}/ruby-$RUBY_VERSION.tar.xz" \ + && echo "$RUBY_DOWNLOAD_SHA256 *ruby.tar.xz" | sha256sum -c - \ + \ + && mkdir -p /usr/src/ruby \ + && tar -xJf ruby.tar.xz -C /usr/src/ruby --strip-components=1 \ + && rm ruby.tar.xz \ + \ + && cd /usr/src/ruby \ + \ +# hack in "ENABLE_PATH_CHECK" disabling to suppress: +# warning: Insecure world writable dir + && { \ + echo '#define ENABLE_PATH_CHECK 0'; \ + echo; \ + cat file.c; \ + } > file.c.new \ + && mv file.c.new file.c \ + \ + && autoconf \ + && gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \ + && ./configure \ + --build="$gnuArch" \ + --disable-install-doc \ + --enable-shared \ + && make -j "$(nproc)" \ + && make install \ + \ + && apt-get purge -y --auto-remove $buildDeps \ + && cd / \ + && rm -r /usr/src/ruby \ + \ + && gem update --system "$RUBYGEMS_VERSION" \ + && gem install bundler --version "$BUNDLER_VERSION" --force \ + && rm -r /root/.gem/ + +# install things globally, for great justice +# and don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_PATH="$GEM_HOME" \ + BUNDLE_BIN="$GEM_HOME/bin" \ + BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $BUNDLE_BIN:$PATH +RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ + && chmod 777 "$GEM_HOME" "$BUNDLE_BIN" + +CMD [ "irb" ] + +FROM ruby-2.2.10-stretch # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -19,7 +100,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -30,16 +111,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -50,27 +125,16 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ - && chmod +x /usr/bin/docker-compose \ - && docker-compose version +# Releases over there don't work as they need a more recent glibc than Stretch has: https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51 +# So we fall back to using stretch-backports which has 1.21 +RUN echo 'deb http://ftp.debian.org/debian stretch-backports main\ndeb-src http://ftp.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports.list \ + && apt-get update \ + && apt-get install -y docker-compose \ + && docker-compose version \ + && rm -rf /var/lib/apt/lists/* # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL="https://github.com/protocolbuffers/protobuf/releases/download/v3.6.1/protoc-3.6.1-linux-x86_64.zip" \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system 2.7.9 diff --git a/.circleci/images/primary/Dockerfile-2.3.8 b/.circleci/images/primary/Dockerfile-2.3.8 index 9fcc4d98592..e973cce3dfa 100644 --- a/.circleci/images/primary/Dockerfile-2.3.8 +++ b/.circleci/images/primary/Dockerfile-2.3.8 @@ -1,5 +1,5 @@ -# Current version: https://github.com/docker-library/ruby/blob/31f66490fdb837ddcc5896e3275f2188f2b7b6dd/2.3/stretch/Dockerfile -FROM ruby:2.3.8 +# Last version: https://github.com/docker-library/ruby/blob/31f66490fdb837ddcc5896e3275f2188f2b7b6dd/2.3/stretch/Dockerfile +FROM ruby:2.3.8-stretch # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -15,7 +15,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -26,16 +26,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -46,27 +40,16 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ - && chmod +x /usr/bin/docker-compose \ - && docker-compose version +# Releases over there don't work as they need a more recent glibc than Stretch has: https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51 +# So we fall back to using stretch-backports which has 1.21 +RUN echo 'deb http://ftp.debian.org/debian stretch-backports main\ndeb-src http://ftp.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports.list \ + && apt-get update \ + && apt-get install -y docker-compose \ + && docker-compose version \ + && rm -rf /var/lib/apt/lists/* # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system diff --git a/.circleci/images/primary/Dockerfile-2.4.10 b/.circleci/images/primary/Dockerfile-2.4.10 index 2053c061864..384e89b4460 100644 --- a/.circleci/images/primary/Dockerfile-2.4.10 +++ b/.circleci/images/primary/Dockerfile-2.4.10 @@ -1,7 +1,6 @@ -# https://hub.docker.com/layers/ruby/library/ruby/2.4.10-stretch/images/sha256-e932ae985bce29c1e1b845332af331fbc7b2cc9a7cb5477b1727f665c78aba0a # NOTE: There are images with the newer debian version 10 (2.4.10-buster) but they broke the sequel gem due to a missing shared library, # so I decided to stay with debian 9 "stretch" -FROM ruby@sha256:e932ae985bce29c1e1b845332af331fbc7b2cc9a7cb5477b1727f665c78aba0a +FROM ruby:2.4.10-stretch # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -17,7 +16,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -28,16 +27,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -48,27 +41,16 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ - && chmod +x /usr/bin/docker-compose \ - && docker-compose version +# Releases over there don't work as they need a more recent glibc than Stretch has: https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51 +# So we fall back to using stretch-backports which has 1.21 +RUN echo 'deb http://ftp.debian.org/debian stretch-backports main\ndeb-src http://ftp.debian.org/debian stretch-backports main' > /etc/apt/sources.list.d/stretch-backports.list \ + && apt-get update \ + && apt-get install -y docker-compose \ + && docker-compose version \ + && rm -rf /var/lib/apt/lists/* # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system diff --git a/.circleci/images/primary/Dockerfile-2.5.9 b/.circleci/images/primary/Dockerfile-2.5.9 index 5c7958f4206..0a6bdff026d 100644 --- a/.circleci/images/primary/Dockerfile-2.5.9 +++ b/.circleci/images/primary/Dockerfile-2.5.9 @@ -1,5 +1,4 @@ -# https://hub.docker.com/layers/ruby/library/ruby/2.5.9-buster/images/sha256-79ee27d55283b0febd609abde9f5e93df8466586e6163bbc07cb502247522f33 -FROM ruby@sha256:79ee27d55283b0febd609abde9f5e93df8466586e6163bbc07cb502247522f33 +FROM ruby:2.5.9 # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -15,7 +14,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -26,16 +25,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -46,27 +39,13 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ +RUN COMPOSE_URL="https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51/docker-compose-$(dpkg --print-architecture)" \ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ && chmod +x /usr/bin/docker-compose \ && docker-compose version # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system diff --git a/.circleci/images/primary/Dockerfile-2.6.7 b/.circleci/images/primary/Dockerfile-2.6.7 index 0939f308baf..6b01c7d4241 100644 --- a/.circleci/images/primary/Dockerfile-2.6.7 +++ b/.circleci/images/primary/Dockerfile-2.6.7 @@ -1,5 +1,4 @@ -# https://hub.docker.com/layers/ruby/library/ruby/2.6.7-buster/images/sha256-88239eaf531f72ca1f641379393228acd399d7db01bee5d566b79276406b4fc6 -FROM ruby@sha256:88239eaf531f72ca1f641379393228acd399d7db01bee5d566b79276406b4fc6 +FROM ruby:2.6.7 # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -15,7 +14,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -26,16 +25,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -46,27 +39,13 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ +RUN COMPOSE_URL="https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51/docker-compose-$(dpkg --print-architecture)" \ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ && chmod +x /usr/bin/docker-compose \ && docker-compose version # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system diff --git a/.circleci/images/primary/Dockerfile-2.7.3 b/.circleci/images/primary/Dockerfile-2.7.3 index e3151ebea4c..963c0346490 100644 --- a/.circleci/images/primary/Dockerfile-2.7.3 +++ b/.circleci/images/primary/Dockerfile-2.7.3 @@ -1,5 +1,4 @@ -# https://hub.docker.com/layers/ruby/library/ruby/2.7.3-buster/images/sha256-aea57a184cb3b1577a58b80069dcf39f051121d0a6968465c926d6798a21b178 -FROM ruby@sha256:aea57a184cb3b1577a58b80069dcf39f051121d0a6968465c926d6798a21b178 +FROM ruby:2.7.3 # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -15,7 +14,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -26,16 +25,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -46,27 +39,13 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ +RUN COMPOSE_URL="https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51/docker-compose-$(dpkg --print-architecture)" \ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ && chmod +x /usr/bin/docker-compose \ && docker-compose version # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems # RUN gem update --system # Upgrading disabled until https://github.com/thoughtbot/appraisal/issues/162 is fixed diff --git a/.circleci/images/primary/Dockerfile-3.0.3 b/.circleci/images/primary/Dockerfile-3.0.3 index ba1ae385600..d03beb213ba 100644 --- a/.circleci/images/primary/Dockerfile-3.0.3 +++ b/.circleci/images/primary/Dockerfile-3.0.3 @@ -1,5 +1,3 @@ -# This image supports multiple platforms, see README for build instructions - FROM ruby:3.0.3-bullseye # Make apt non-interactive diff --git a/.circleci/images/primary/Dockerfile-3.1.1 b/.circleci/images/primary/Dockerfile-3.1.1 index 5083770da76..cf27e09a94d 100644 --- a/.circleci/images/primary/Dockerfile-3.1.1 +++ b/.circleci/images/primary/Dockerfile-3.1.1 @@ -1,5 +1,3 @@ -# This image supports multiple platforms, see README for build instructions - FROM ruby:3.1.1-bullseye # Make apt non-interactive diff --git a/.circleci/images/primary/Dockerfile-3.2.0-preview2 b/.circleci/images/primary/Dockerfile-3.2.0-preview2 index 92a9e7b7d89..32e7ea75b4c 100644 --- a/.circleci/images/primary/Dockerfile-3.2.0-preview2 +++ b/.circleci/images/primary/Dockerfile-3.2.0-preview2 @@ -1,5 +1,3 @@ -# This image supports multiple platforms, see README for build instructions - FROM ruby:3.2.0-preview2-bullseye # Make apt non-interactive diff --git a/.circleci/images/primary/Dockerfile-jruby-9.2-latest b/.circleci/images/primary/Dockerfile-jruby-9.2-latest index d8d10b99465..01c6ab4979d 100644 --- a/.circleci/images/primary/Dockerfile-jruby-9.2-latest +++ b/.circleci/images/primary/Dockerfile-jruby-9.2-latest @@ -1,11 +1,56 @@ -# https://hub.docker.com/layers/jruby/library/jruby/9.2.18-jre8/images/sha256-8dd56d26850fbba5c558fe195f98f2cc765d82e91ace601e3fc2273c1f9c95b5 -FROM jruby@sha256:8dd56d26850fbba5c558fe195f98f2cc765d82e91ace601e3fc2273c1f9c95b5 # NOTE BEFORE YOU UPGRADE TO A LATER JRUBY 9.2 VERSION: # There's an incompatibility in JRuby 9.2.19.0+ when run on Java 8 (jre8) with the ethon gem, see # https://github.com/jruby/jruby/issues/7033 . # The issue goes away if we run on Java 11, but we probably want to test on 8. # So, as of this writing (January 2022) we cannot have it all: latest ethon, ethon testing enable, latest JRuby 9.2, # and Java 8. One always has to give. +# +# since next one is 9.2.19.0 at https://github.com/jruby/docker-jruby/blob/d083a9c13640eba8c135caeefbff3b89350bbede/9.2/jre8/Dockerfile +# we took the following from this one which is 9.2.11 as default but AFAICT was used to build 9.2.18 +# https://github.com/jruby/docker-jruby/blob/f94681bb26c3da5159e8c0ba9842005a011a76de/9000/jre8/Dockerfile +# +# a more recent one would be https://github.com/jruby/docker-jruby/blob/9881bee2d7510aa17dba6b1d7ae5ff711fddd624/9.2/jre8/Dockerfile +# +# openjdk:8-jre image is from https://github.com/docker-library/openjdk/blob/a0c4da867ddd1a11408b7ec5032f12130bdc5476/8/jre/bullseye/Dockerfile +# note: docker-library/openjdk is deprecated, there is a later move to https://hub.docker.com/_/eclipse-temurin +FROM openjdk:8-jre-buster AS jruby-9.2.18.0-jre8 + +RUN apt-get update && apt-get install -y libc6-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* + +ENV JRUBY_VERSION 9.2.18.0 +ENV JRUBY_SHA256 425a5c970a6d918ae531275850634d12169e3557754b2b817fbfb7987a32c1a7 +RUN mkdir /opt/jruby \ + && curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \ + && echo "$JRUBY_SHA256 /tmp/jruby.tar.gz" | sha256sum -c - \ + && tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \ + && rm /tmp/jruby.tar.gz \ + && update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1 +ENV PATH /opt/jruby/bin:$PATH + +# skip installing gem documentation +RUN mkdir -p /opt/jruby/etc \ + && { \ + echo 'install: --no-document'; \ + echo 'update: --no-document'; \ + } >> /opt/jruby/etc/gemrc + +RUN gem install bundler rake net-telnet xmlrpc + +# install things globally, for great justice +# and don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_PATH="$GEM_HOME" \ + BUNDLE_BIN="$GEM_HOME/bin" \ + BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $BUNDLE_BIN:$PATH +RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ + && chmod 777 "$GEM_HOME" "$BUNDLE_BIN" + +CMD [ "irb" ] + +# See note at the top before updating to a later version! +FROM jruby-9.2.18.0-jre8 # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -21,7 +66,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less \ + tzdata rsync vim less jq \ build-essential \ shared-mime-info; \ rm -rf /var/lib/apt/lists/*; @@ -34,16 +79,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -54,27 +93,13 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ +RUN COMPOSE_URL="https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51/docker-compose-$(dpkg --print-architecture)" \ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ && chmod +x /usr/bin/docker-compose \ && docker-compose version # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system @@ -91,4 +116,4 @@ RUN echo "export PATH=/opt/jruby/bin:$BUNDLE_BIN:\$PATH" >> ~/.profile RUN mkdir /app WORKDIR /app -CMD ["bin", "bash", "--login"] +CMD ["/bin/sh"] diff --git a/.circleci/images/primary/Dockerfile-jruby-9.2.8.0 b/.circleci/images/primary/Dockerfile-jruby-9.2.8.0 index e48e56808c6..c7b0b6d8258 100644 --- a/.circleci/images/primary/Dockerfile-jruby-9.2.8.0 +++ b/.circleci/images/primary/Dockerfile-jruby-9.2.8.0 @@ -1,5 +1,44 @@ -# https://hub.docker.com/layers/jruby/library/jruby/9.2.8.0/images/sha256-09853d6cde79a53d89049ba6e0f22625c1c0a425f4f72b9982cbd81653df2ca0 -FROM jruby@sha256:09853d6cde79a53d89049ba6e0f22625c1c0a425f4f72b9982cbd81653df2ca0 +# taken from https://github.com/jruby/docker-jruby/blob/5de2f8fd4c518cfb621be236fe7e9732c77b6129/9000/jre/Dockerfile +# +# openjdk:8-jre image is from https://github.com/docker-library/openjdk/blob/a0c4da867ddd1a11408b7ec5032f12130bdc5476/8/jre/bullseye/Dockerfile +# note: docker-library/openjdk is deprecated, there is a later move to https://hub.docker.com/_/eclipse-temurin +FROM openjdk:8-jre-buster AS jruby-9.2.8.0-jre8 + +RUN apt-get update && apt-get install -y libc6-dev --no-install-recommends && rm -rf /var/lib/apt/lists/* + +ENV JRUBY_VERSION 9.2.8.0 +ENV JRUBY_SHA256 b7c58688093f54acd89d732a8bf40e3ae0ac4c92488d6f5b424c33e4fb09c7bb +RUN mkdir /opt/jruby \ + && curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \ + && echo "$JRUBY_SHA256 /tmp/jruby.tar.gz" | sha256sum -c - \ + && tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \ + && rm /tmp/jruby.tar.gz \ + && update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1 +ENV PATH /opt/jruby/bin:$PATH + +# skip installing gem documentation +RUN mkdir -p /opt/jruby/etc \ + && { \ + echo 'install: --no-document'; \ + echo 'update: --no-document'; \ + } >> /opt/jruby/etc/gemrc + +RUN gem install bundler rake net-telnet xmlrpc + +# install things globally, for great justice +# and don't create ".bundle" in all our apps +ENV GEM_HOME /usr/local/bundle +ENV BUNDLE_PATH="$GEM_HOME" \ + BUNDLE_BIN="$GEM_HOME/bin" \ + BUNDLE_SILENCE_ROOT_WARNING=1 \ + BUNDLE_APP_CONFIG="$GEM_HOME" +ENV PATH $BUNDLE_BIN:$PATH +RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \ + && chmod 777 "$GEM_HOME" "$BUNDLE_BIN" + +CMD [ "irb" ] + +FROM jruby-9.2.8.0-jre8 # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -15,7 +54,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less \ + tzdata rsync vim less jq \ build-essential; \ rm -rf /var/lib/apt/lists/*; @@ -27,16 +66,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -47,17 +80,13 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ +RUN COMPOSE_URL="https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51/docker-compose-$(dpkg --print-architecture)" \ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ && chmod +x /usr/bin/docker-compose \ && docker-compose version # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system @@ -70,4 +99,4 @@ RUN echo "export PATH=/opt/jruby/bin:$BUNDLE_BIN:\$PATH" >> ~/.profile RUN mkdir /app WORKDIR /app -CMD ["bin", "bash", "--login"] +CMD ["/bin/sh"] diff --git a/.circleci/images/primary/Dockerfile-jruby-9.3-latest b/.circleci/images/primary/Dockerfile-jruby-9.3-latest index e596c9f5bc6..ffda357322e 100644 --- a/.circleci/images/primary/Dockerfile-jruby-9.3-latest +++ b/.circleci/images/primary/Dockerfile-jruby-9.3-latest @@ -1,5 +1,4 @@ -# https://hub.docker.com/layers/jruby/library/jruby/9.3.4-jre11/images/sha256-1d34d94aa7f88994411f33075a57ab5d55384749977f932c3a8e470a6c5574e6?context=explore -FROM jruby@sha256:1d34d94aa7f88994411f33075a57ab5d55384749977f932c3a8e470a6c5574e6 +FROM jruby:9.3.4-jre11 # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -15,7 +14,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less \ + tzdata rsync vim less jq \ build-essential \ shared-mime-info; \ rm -rf /var/lib/apt/lists/*; @@ -28,16 +27,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -48,27 +41,13 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ +RUN COMPOSE_URL="https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51/docker-compose-$(dpkg --print-architecture)" \ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ && chmod +x /usr/bin/docker-compose \ && docker-compose version # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version - -# Install Protobuf compiler -RUN export PROTOC_URL=$(curl -s https://api.github.com/repos/protocolbuffers/protobuf/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep -e 'protoc-[.0-9]*-linux-x86_64\.zip' | sort -r | head -n 1) \ - && echo Protoc URL: $PROTOC_URL \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/protoc.zip "${PROTOC_URL}" \ - && ls -lha /tmp/protoc.zip \ - && unzip /tmp/protoc.zip -d /tmp/protoc \ - && mv /tmp/protoc/bin/* /usr/bin \ - && rm -rf /tmp/protoc /tmp/protoc.zip \ - && protoc --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize # Install RubyGems RUN gem update --system @@ -85,4 +64,4 @@ RUN echo "export PATH=/opt/jruby/bin:$BUNDLE_BIN:\$PATH" >> ~/.profile RUN mkdir /app WORKDIR /app -CMD ["bin", "bash", "--login"] +CMD ["/bin/sh"] diff --git a/.circleci/images/primary/Dockerfile-truffleruby-21.3.0 b/.circleci/images/primary/Dockerfile-truffleruby-22.3.0 similarity index 64% rename from .circleci/images/primary/Dockerfile-truffleruby-21.3.0 rename to .circleci/images/primary/Dockerfile-truffleruby-22.3.0 index 014b542947a..7e17a789689 100644 --- a/.circleci/images/primary/Dockerfile-truffleruby-21.3.0 +++ b/.circleci/images/primary/Dockerfile-truffleruby-22.3.0 @@ -1,4 +1,4 @@ -FROM ghcr.io/flavorjones/truffleruby:21.3.0 +FROM ghcr.io/graalvm/truffleruby:debian-22.3.0 # Make apt non-interactive RUN echo 'APT::Get::Assume-Yes "true";' > /etc/apt/apt.conf.d/90circleci \ @@ -14,7 +14,7 @@ RUN set -ex; \ git mercurial xvfb \ locales sudo openssh-client ca-certificates tar gzip parallel \ net-tools netcat unzip zip bzip2 gnupg curl wget \ - tzdata rsync vim less; \ + tzdata rsync vim less jq; \ rm -rf /var/lib/apt/lists/*; # Set timezone to UTC by default @@ -26,16 +26,10 @@ RUN locale-gen en_US.UTF-8 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en -# Install jq -RUN JQ_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/jq-latest" \ - && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/jq $JQ_URL \ - && chmod +x /usr/bin/jq \ - && jq --version - # Install Docker RUN set -ex \ - && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/x86_64/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ - && DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/${DOCKER_VERSION}" \ + && export DOCKER_VERSION=$(curl --silent --fail --retry 3 https://download.docker.com/linux/static/stable/$(arch)/ | grep -o -e 'docker-[.0-9]*-ce\.tgz' | sort -r | head -n 1) \ + && DOCKER_URL="https://download.docker.com/linux/static/stable/$(arch)/${DOCKER_VERSION}" \ && echo Docker URL: $DOCKER_URL \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ && ls -lha /tmp/docker.tgz \ @@ -46,17 +40,16 @@ RUN set -ex \ && (docker version || true) # Install Docker Compose -RUN COMPOSE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/docker-compose-latest" \ +RUN COMPOSE_URL="https://github.com/linuxserver/docker-docker-compose/releases/download/1.29.2-ls51/docker-compose-$(dpkg --print-architecture)" \ && curl --silent --show-error --location --fail --retry 3 --output /usr/bin/docker-compose $COMPOSE_URL \ && chmod +x /usr/bin/docker-compose \ && docker-compose version # Install Dockerize -RUN DOCKERIZE_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/dockerize-latest.tar.gz" \ - && curl --silent --show-error --location --fail --retry 3 --output /tmp/dockerize-linux-amd64.tar.gz $DOCKERIZE_URL \ - && tar -C /usr/local/bin -xzvf /tmp/dockerize-linux-amd64.tar.gz \ - && rm -rf /tmp/dockerize-linux-amd64.tar.gz \ - && dockerize --version +RUN curl -sfL $(curl -s https://api.github.com/repos/powerman/dockerize/releases/latest | grep -i /dockerize-$(uname -s)-$(dpkg --print-architecture)\" | cut -d\" -f4) | install /dev/stdin /usr/local/bin/dockerize + +# Set missing vars +ENV GEM_HOME="/usr/local/bundle" # Install RubyGems RUN gem update --system @@ -67,7 +60,7 @@ RUN gem update --system RUN gem install bundler ENV BUNDLE_SILENCE_ROOT_WARNING 1 -RUN mkdir /app +RUN mkdir -p /app WORKDIR /app CMD ["/bin/sh"] diff --git a/.circleci/images/primary/README.md b/.circleci/images/primary/README.md index 085457cc040..b83101d0422 100644 --- a/.circleci/images/primary/README.md +++ b/.circleci/images/primary/README.md @@ -2,20 +2,17 @@ This folder contains Dockerfiles for all versions of Ruby used in the testing and development of dd-trace-rb. -## Multiplatform builds +## Multi-arch images -Images marked with a "# This image supports multiple platforms" are able to be built for both amd64 (x86_64) and -arm64 (aarch64) Linux. +All images are able to be built for both `x86_64` (a.k.a `amd64`) and `aarch64` (a.k.a `arm64/v8`) Linux. -Here's an example of building the Ruby 3.1 image: +Here's an example of manually building Ruby 3.1 images: ```bash -# To build and push the image (update tag as needed): -$ docker buildx build . --platform linux/amd64,linux/arm64/v8 -f Dockerfile-3.1.1 -t ivoanjo/docker-library:ddtrace_rb_3_1_1 --push +# To build single-arch images locally (NEVER PUSH THESE!): +$ docker buildx build . --platform linux/x86_64 -f Dockerfile-3.1.1 -t ghcr.io/datadog/dd-trace-rb/ruby:3.1.1-dd +$ docker buildx build . --platform linux/aarch64 -f Dockerfile-3.1.1 -t ghcr.io/datadog/dd-trace-rb/ruby:3.1.1-dd -# The tag created will automatically contain both architectures. To additionally create an -# architecture-specific tag, I needed to do the following (sha is the specific image) -$ docker pull ivoanjo/docker-library:ddtrace_rb_3_1_1@sha256:56402a1c5e522b669965db4600f1a4fa035f6e3597d098ec808e77192c4238fd -$ docker tag ivoanjo/docker-library@sha256:56402a1c5e522b669965db4600f1a4fa035f6e3597d098ec808e77192c4238fd ivoanjo/docker-library:ddtrace_rb_3_1_1_amd64 -$ docker push ivoanjo/docker-library:ddtrace_rb_3_1_1_amd64 +# To build AND push multi-arch images (but DON'T DO THAT IN GENERAL, unless e.g CI is down): +$ docker buildx build . --platform linux/x86_64,linux/aarch64 -f Dockerfile-3.1.1 -t ghcr.io/datadog/dd-trace-rb/ruby:3.1.1-dd --push ``` diff --git a/.circleci/images/primary/binary_version b/.circleci/images/primary/binary_version new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/.circleci/images/primary/binary_version @@ -0,0 +1 @@ +1 diff --git a/.github/workflows/build-ruby.yml b/.github/workflows/build-ruby.yml new file mode 100644 index 00000000000..676867c2ff0 --- /dev/null +++ b/.github/workflows/build-ruby.yml @@ -0,0 +1,128 @@ +name: Build Ruby + +on: + workflow_dispatch: + inputs: + push: + description: Push images + required: true + type: boolean + default: true + push: + branches: + - "**" + +env: + REGISTRY: ghcr.io + +jobs: + build: + strategy: + fail-fast: false + matrix: + include: + - engine: ruby + version: 2.1.10 + dockerfile: Dockerfile-2.1.10 + - engine: ruby + version: 2.2.10 + dockerfile: Dockerfile-2.2.10 + - engine: ruby + version: 2.3.8 + dockerfile: Dockerfile-2.3.8 + - engine: ruby + version: 2.4.10 + dockerfile: Dockerfile-2.4.10 + - engine: ruby + version: 2.5.9 + dockerfile: Dockerfile-2.5.9 + - engine: ruby + version: 2.6.7 + dockerfile: Dockerfile-2.6.7 + - engine: ruby + version: 2.7.3 + dockerfile: Dockerfile-2.7.3 + - engine: ruby + version: 3.0.3 + dockerfile: Dockerfile-3.0.3 + - engine: ruby + version: 3.1.1 + dockerfile: Dockerfile-3.1.1 + - engine: ruby + version: 3.2.0-preview2 + dockerfile: Dockerfile-3.2.0-preview2 + - engine: jruby + version: 9.2.18.0 + dockerfile: Dockerfile-jruby-9.2-latest + - engine: jruby + version: 9.2.8.0 + dockerfile: Dockerfile-jruby-9.2.8.0 + - engine: jruby + version: 9.3.4.0 + dockerfile: Dockerfile-jruby-9.3-latest + - engine: truffleruby + version: 22.3.0 + dockerfile: Dockerfile-truffleruby-22.3.0 + runs-on: ubuntu-latest + name: Build (${{ matrix.engine }} ${{ matrix.version }}) + steps: + - name: Checkout + uses: actions/checkout@v2 + + # Using docker-container engine enables advanced buildx features + - name: Set up Docker container engine + run: | + docker buildx create --name=container --driver=docker-container --use --bootstrap + + # First, build image for x86_64 as it will fail fast + # + # Tagging is necessary to reference the image for the testing step + # Tagging is done separately to avoid interfrence with caching + - name: Build single-arch image (x86_64) + run: | + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --output=type=image,push=false --platform linux/x86_64 -f ${{ matrix.dockerfile }} + working-directory: .circleci/images/primary + - name: Tag single-arch image (x86_64) + run: | + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --load --platform linux/x86_64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd + working-directory: .circleci/images/primary + - name: Test single-arch image (x86_64) + run: | + docker run --platform linux/x86_64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd ruby -e 'puts RUBY_DESCRIPTION' + docker run --platform linux/x86_64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd gem --version + docker run --platform linux/x86_64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd bundle --version + + # Then, build image for aarch64 which, being emulated under qemu, is slower + # + # Tagging is necessary to reference the image for the testing step + # Tagging is done separately to avoid interfrence with caching + # Start by enabling qemu for aarch64 + - name: Enable aarch64 emulation (x86_64) + run: | + docker run --privileged --rm tonistiigi/binfmt --install arm64 + - name: Build single-arch image (aarch64) + run: | + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --output=type=image,push=false --platform linux/aarch64 -f ${{ matrix.dockerfile }} + working-directory: .circleci/images/primary + - name: Tag single-arch image (aarch64) + run: | + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --load --platform linux/aarch64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd + working-directory: .circleci/images/primary + - name: Test single-arch image (aarch64) + run: | + docker run --platform linux/aarch64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd ruby -e 'puts RUBY_DESCRIPTION' + docker run --platform linux/aarch64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd gem --version + docker run --platform linux/aarch64 --rm ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd bundle --version + + # Finally, assemble multi-arch image for a combined push to the registry + # + # This reruns docker build but layers are in the cache, so it's fast + - name: Log in to the Container Registry + if: ${{ inputs.push }} + run: | + echo ${{ secrets.GITHUB_TOKEN }} | docker login ${{ env.REGISTRY }} -u ${{ github.actor }} --password-stdin + - name: Build multi-arch image (x86_64, aarch64) + if: ${{ inputs.push }} + run: | + docker buildx build . --builder=container --cache-from=type=registry,ref=${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd --output=type=image,push=true --build-arg BUILDKIT_INLINE_CACHE=1 --platform linux/x86_64,linux/aarch64 -f ${{ matrix.dockerfile }} --tag ${{ env.REGISTRY }}/datadog/dd-trace-rb/${{ matrix.engine }}:${{ matrix.version }}-dd + working-directory: .circleci/images/primary diff --git a/docker-compose.yml b/docker-compose.yml index 010802fc412..e58ce493466 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,8 +2,7 @@ version: '3.2' services: # MRI tracer-2.1: - image: ivoanjo/docker-library:ddtrace_rb_2_1_10 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.1.10-dd command: /bin/bash depends_on: - ddagent @@ -39,8 +38,7 @@ services: - bundle-2.1:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-2.2: - image: ivoanjo/docker-library:ddtrace_rb_2_2_10 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.2.10-dd command: /bin/bash depends_on: - ddagent @@ -62,8 +60,7 @@ services: - bundle-2.2:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-2.3: - image: ivoanjo/docker-library:ddtrace_rb_2_3_8 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.3.8-dd command: /bin/bash depends_on: - ddagent @@ -85,8 +82,7 @@ services: - bundle-2.3:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-2.4: - image: ivoanjo/docker-library:ddtrace_rb_2_4_10 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.4.10-dd command: /bin/bash depends_on: - ddagent @@ -108,8 +104,7 @@ services: - bundle-2.4:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-2.5: - image: ivoanjo/docker-library:ddtrace_rb_2_5_9 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.5.9-dd command: /bin/bash depends_on: - ddagent @@ -131,8 +126,7 @@ services: - bundle-2.5:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-2.6: - image: ivoanjo/docker-library:ddtrace_rb_2_6_7 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.6.7-dd command: /bin/bash depends_on: - ddagent @@ -154,8 +148,7 @@ services: - bundle-2.6:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-2.7: - image: ivoanjo/docker-library:ddtrace_rb_2_7_3 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:2.7.3-dd command: /bin/bash depends_on: - ddagent @@ -177,8 +170,7 @@ services: - bundle-2.7:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-3.0: - image: ivoanjo/docker-library:ddtrace_rb_3_0_3 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:3.0.3-dd command: /bin/bash depends_on: - ddagent @@ -209,30 +201,8 @@ services: - extension-build-tmp:/app/tmp - bundle-3.0:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" - tracer-3.0-arm64: - image: ivoanjo/docker-library:ddtrace_rb_3_0_3_arm64 - command: /bin/bash - depends_on: - - ddagent - - elasticsearch - - memcached - - mongodb - - mysql - - postgres - - redis - - redis_old - env_file: ./.env - environment: *common-environment-3x - stdin_open: true - tty: true - volumes: - - .:/app - - extension-build-tmp:/app/tmp - - bundle-3.0-arm64:/usr/local/bundle - - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-3.1: - image: ivoanjo/docker-library:ddtrace_rb_3_1_1 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:3.1.1-dd command: /bin/bash depends_on: - ddagent @@ -252,30 +222,8 @@ services: - extension-build-tmp:/app/tmp - bundle-3.1:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" - tracer-3.1-arm64: - image: ivoanjo/docker-library:ddtrace_rb_3_1_1_arm64 - command: /bin/bash - depends_on: - - ddagent - - elasticsearch - - memcached - - mongodb - - mysql - - postgres - - redis - - redis_old - env_file: ./.env - environment: *common-environment-3x - stdin_open: true - tty: true - volumes: - - .:/app - - extension-build-tmp:/app/tmp - - bundle-3.1-arm64:/usr/local/bundle - - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-3.2: - image: ivoanjo/docker-library:ddtrace_rb_3_2_0_preview2 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/ruby:3.2.0-preview2-dd command: /bin/bash depends_on: - ddagent @@ -295,32 +243,10 @@ services: - extension-build-tmp:/app/tmp - bundle-3.2:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" - tracer-3.2-arm64: - image: ivoanjo/docker-library:ddtrace_rb_3_2_0_preview2_arm64 - command: /bin/bash - depends_on: - - ddagent - - elasticsearch - - memcached - - mongodb - - mysql - - postgres - - redis - - redis_old - env_file: ./.env - environment: *common-environment-3x - stdin_open: true - tty: true - volumes: - - .:/app - - extension-build-tmp:/app/tmp - - bundle-3.2-arm64:/usr/local/bundle - - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" # ADD NEW RUBIES HERE # JRuby tracer-jruby-9.2.8.0: - image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_8_0 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/jruby:9.2.8.0-dd command: /bin/bash depends_on: - ddagent @@ -341,8 +267,7 @@ services: - bundle-jruby-9.2.8.0:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-jruby-9.2-latest: - image: ivoanjo/docker-library:ddtrace_rb_jruby_9_2_18_0 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/jruby:9.2.18.0-dd command: /bin/bash depends_on: - ddagent @@ -363,8 +288,7 @@ services: - bundle-jruby-9.2-latest:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" tracer-jruby-9.3-latest: - image: ivoanjo/docker-library:ddtrace_rb_jruby_9_3_4_0 - platform: linux/x86_64 + image: ghcr.io/datadog/dd-trace-rb/jruby:9.3.4.0-dd command: /bin/bash depends_on: - ddagent @@ -385,9 +309,8 @@ services: - bundle-jruby-9.3-latest:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" # TruffleRuby - tracer-truffleruby-21.3.0: - image: ivoanjo/docker-library:ddtrace_rb_truffleruby_21_3_0 - platform: linux/x86_64 + tracer-truffleruby-22.3.0: + image: ghcr.io/datadog/dd-trace-rb/truffleruby:22.3.0-dd command: /bin/bash depends_on: - ddagent @@ -405,7 +328,7 @@ services: tty: true volumes: - .:/app - - bundle-truffleruby-21.3.0:/usr/local/bundle + - bundle-truffleruby-22.3.0:/usr/local/bundle - "ddagent_var_run:${TEST_DDAGENT_VAR_RUN}" ddagent: image: datadog/agent @@ -455,6 +378,8 @@ services: - MYSQL_ROOT_PASSWORD=$TEST_MYSQL_ROOT_PASSWORD - MYSQL_PASSWORD=$TEST_MYSQL_PASSWORD - MYSQL_USER=$TEST_MYSQL_USER + command: + - '--default-authentication-plugin=mysql_native_password' expose: - "3306" ports: @@ -472,7 +397,6 @@ services: presto: # Move to trinodb/trino after https://github.com/treasure-data/presto-client-ruby/issues/64 is resolved. image: starburstdata/presto:332-e.9 - platform: linux/x86_64 expose: - "8080" ports: @@ -499,16 +423,13 @@ volumes: bundle-2.6: bundle-2.7: bundle-3.0: - bundle-3.0-arm64: bundle-3.1: - bundle-3.1-arm64: bundle-3.2: - bundle-3.2-arm64: # ADD NEW RUBIES HERE bundle-jruby-9.2.8.0: bundle-jruby-9.2-latest: bundle-jruby-9.3-latest: - bundle-truffleruby-21.3.0: + bundle-truffleruby-22.3.0: ddagent_var_run: # Temporary folder used while compiling the profiling native extension. We place this in a volume to avoid the # massive performance hit (seconds to minutes) that we get when the tmp folder is shared with the host on macOS.