Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src/main/java/com/rookout
Dockerfile
Makefile
README.md
docker-compose.yaml
pom.xml

README.md

Quickstart for Java Docker Compose debugging

A sample application for using Rookout to debug a Java app built using Maven or Gradle, and deployed using Docker Compose.

Before following this guide we recommend reading the basic Java + Rookout guide.

This sample may be out of date. If you face any issues, please reach out to mailto:support@rookout.com and let us know.

Using Docker Compose

  1. Compile the project jar:

    $ make build
  2. Edit docker-compose.yaml and add your Rookout token:

        environment:
          ROOKOUT_TOKEN: YOUR_TOKEN_HERE
  3. Build the image:

    $ docker-compose build
    
  4. Run:

    $ docker-compose up
  5. Make sure everything worked: http://localhost:7000/hello

  6. Go to http://app.rookout.com and start debugging!

Rookout Integration explained

This example is based of the Java javalin "Hello-World" example available here.

We have added Rookout to the original project by:

  1. Adding soruces to the project jar(pom.xml):

            <resources>
                <resource>
                    <directory>${basedir}/src/main/java</directory>
                </resource>
            </resources>
  2. Downloading the Rookout Java Agent available on maven central:

        wget "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.rookout&a=rook&v=LATEST"  -O rook.jar
  3. Configuring our ROOKOUT_TOKEN on docker-compose.yaml:

        environment:
          ROOKOUT_TOKEN: YOUR_TOKEN_HERE
  4. Specifying the Rookout Java Agent when running:

        java  -javaagent:rook.jar -jar target/rookoutDemo-1.0.0.jar 
You can’t perform that action at this time.