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.
.mvn/wrapper
src/main
.gitignore
README.md
mvnw
mvnw.cmd
pom.xml

README.md

Containerize a Dropwizard application with Jib

How to start the Dropwizard application

  1. Run ./mvnw clean package to build your container
  2. Start the application
    • With Docker: docker run --rm -p 8080:8080 dropwizard-jib-example:1
    • Without Docker: ./mvnw exec:java
  3. Check that your application is running at http://localhost:8080/hello-world

Health Check

See your application's health at http://localhost:8080/admin/healthcheck

Extras

FreeMaker templating is setup for dropwizard.yml through tkrille/dropwizard-template-config; this allows one to heavily customize the properties file via the container environment with FTL conditional checks and for loops, for example.

How this example was generated

Starter Maven template generated with dropwizard-archetypes

mvn archetype:generate \
  -DarchetypeGroupId=io.dropwizard.archetypes \
  -DarchetypeArtifactId=example \
  -DarchetypeVersion=[REPLACE ME WITH A VALID DROPWIZARD VERSION]

Ref. Dropwizard - Getting Started, Setting up With Maven

The remainder of the archetype code was filled-in following the above guide.

More information

Learn more about Jib.

Learn more about Dropwizard.

You can’t perform that action at this time.