-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Ruby folder * Add Ruby agent Dockerfile
- Loading branch information
1 parent
f216fb1
commit 23d18bf
Showing
3 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# To build one auto-instrumentation image for Ruby, please: | ||
# - Ensure the packages are installed in the `/instrumentation` directory. This is required as when instrumenting the pod, | ||
# one init container will be created to copy all the content in `/instrumentation` directory to your app's container. | ||
# - Grant the necessary access to `/instrumentation` directory. `chmod -R go+r /instrumentation` | ||
|
||
FROM ruby:latest AS build | ||
WORKDIR /operator-build | ||
|
||
# Install gems from Gemfile into the `workspace` directory | ||
ADD Gemfile . | ||
RUN BUNDLE_PATH=workspace bundle install | ||
|
||
FROM busybox | ||
|
||
# Copy build artifacts from previous | ||
COPY --from=build /operator-build /operator-build | ||
WORKDIR /operator-build | ||
|
||
# Shell command to search inside the `workspace/ruby` directory for a directory that starts with `newrelic_rpm`. | ||
# Example of a found result: workspace/ruby/3.2.0/gems/newrelic_rpm-9.9.0 | ||
# Copy the result into a new directory called `/instrumentation`. | ||
RUN sh -c "find 'workspace/ruby/' -type d -name newrelic_rpm\\* -exec cp -r '{}' /instrumentation \\;" | ||
|
||
# Adjust permissions of `instrumentation` director to readable by everyone | ||
RUN chmod -R go+r /instrumentation | ||
|
||
# Clean up build artifacts | ||
RUN rm -rf /operator-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
|
||
gem 'newrelic_rpm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file only exists to satisfy FOSSA security scan. It is not used. | ||
|
||
GEM | ||
remote: https://rubygems.org/ | ||
specs: | ||
newrelic_rpm (9.9.0) | ||
|
||
PLATFORMS | ||
ruby | ||
x86_64-darwin-23 | ||
|
||
DEPENDENCIES | ||
newrelic_rpm | ||
|
||
BUNDLED WITH | ||
2.5.6 |