Skip to content

Move Newrelic Downloads into Dockerfile #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM gradle:7.5.1-jdk17 AS builder
FROM gradle:8.9.0-jdk17 AS builder
COPY --chown=gradle:gradle . /home/gradle/src
WORKDIR /home/gradle/src
RUN gradle downloadNewrelic && gradle unzipNewrelic
RUN apt-get update && apt-get install -y unzip curl
RUN curl -O https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip \
&& unzip newrelic-java.zip
RUN gradle bootJar --no-daemon

FROM amazoncorretto:17-alpine
Expand Down
13 changes: 1 addition & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,4 @@ jacocoTestReport {
xml.required = true
xml.outputLocation = file("$rootDir/reports/coverage.xml")
}
}

task downloadNewrelic(type: Download) {
mkdir 'newrelic'
src 'https://download.newrelic.com/newrelic/java-agent/newrelic-agent/current/newrelic-java.zip'
dest file('newrelic')
}

task unzipNewrelic(type: Copy) {
from zipTree(file('newrelic/newrelic-java.zip'))
into rootDir
}
}