-
I want to import new-relic into my spring-boot-app image without to use "COPY new-relic.jar" in Dockerfile for runImage. I tried this task in build.gradle: bootBuildImage {
builder = "paketobuildpacks/builder:tiny"
buildpacks = [
"gcr.io/paketo-buildpacks/ca-certificates",
"gcr.io/paketo-buildpacks/amazon-corretto",
"gcr.io/paketo-buildpacks/syft",
"gcr.io/paketo-buildpacks/executable-jar",
"gcr.io/paketo-buildpacks/dist-zip",
"gcr.io/paketo-buildpacks/spring-boot",
"gcr.io/paketo-buildpacks/new-relic"
]
environment = [
"BP_JVM_VERSION" : "17.*",
"BPL_SPRING_CLOUD_BINDINGS_DISABLED": "true",
"JAVA_TOOL_OPTIONS": "-XX:ActiveProcessorCount=4"
]
runImage = "paketobuildpacks/run:tiny"
} Then run with this command: And the Error return below:
I think
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Short answer: you need to include a binding for the New Relic buildpack to detect properly.
https://github.com/paketo-buildpacks/new-relic/#behavior See this doc page for details on bindings. In a nutshell, a binding is just a folder with files. One file called You then need to set the binding as a volume mounted to the app at build time and at runtime. At build time, you can do that by adding |
Beta Was this translation helpful? Give feedback.
Short answer: you need to include a binding for the New Relic buildpack to detect properly.
https://github.com/paketo-buildpacks/new-relic/#behavior
See this doc page for details on bindings. In a nutshell, a binding is just a folder with files. One file called
type
with a value ofNewRelic
and then additional files for settings you want to pass to the New Relic buildpack, where the name is the key and the contents are the value. For example, a file calledlicense_key
with the contents of<your license>
would get passed through to New Relic as it's license key (it's passed through via an env variableNEW_RELIC_LICENSE_KEY
which is automatically set).