Simple base java application that includes newrelic agent.
728
Turo's extension of a base java image
This image adds newrelic and provides a default entrypoint.
Here is an example of a gradle file using this image:
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath('se.transmode.gradle:gradle-docker:1.2')
}
}
repositories {
mavenCentral()
jcenter()
}
apply plugin: 'docker'
task buildDocker(type: Docker) {
baseImage "turo/java-app"
push = project.hasProperty('push')
tag = "turo/image-proxy"
// copy the spring boot jar from the jar task
addFile {
from jar
rename { 'app.jar' }
}
// run any additional commands to configure/install software during build
runCommand 'apt-get update'
runCommand 'apt-get -y install imagemagick'
}
buildDocker.dependsOn(bootRepackage, assemble)
To run this image, issue the command with appropriate environment variables set:
docker run \
-e SPRING_PROFILES_ACTIVE=<comman separated list of active profiles> \
-e NEW_RELIC_APP_NAME=<app name as it will appear in newrelic> \
-e NEW_RELIC_LICENSE_KEY=<newrelic license key> \
-p 8080:8080 turo/image-proxy:1.0.0-dev
Content type
Image
Digest
Size
111.2 MB
Last updated
about 7 years ago
docker pull relayrides/java-app