Public | Automated Build

Last pushed: 3 months ago
Short Description
Simple base java application that includes newrelic agent.
Full Description

docker-java-app

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 "relayrides/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
Docker Pull Command
Owner
turo
Source Repository

Comments (0)