GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pmd/docker: Repo containing the dockerfiles and scripts to produce the official PMD containers.

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 

Repository files navigation

PMD Docker

Docker Image Version Docker Pulls

Provides PMD packaged in a Docker image ready to use. It uses the alpine linux flavor of Eclipse Temurin as the basis.

  • Maintained by: PMD
  • Dockerfile: https://github.com/pmd/docker/blob/main/Dockerfile
  • Available at these registries:
    • https://hub.docker.com/r/pmdcode/pmd (docker pull pmdcode/pmd)
    • https://github.com/pmd/docker/pkgs/container/pmd (docker pull ghcr.io/pmd/pmd)

Quickstart

docker run --rm --tty -v $PWD:/src pmdcode/pmd:latest check -d . -R rulesets/java/quickstart.xml

How to use this image

Verify it works

This just displays the PMD version.

docker run --rm --tty pmdcode/pmd:latest --version

Only using default rulesets

In order to give access to the source code being analyzed, bind-mount the project source folder using -v /path/to/project:/project:

docker run --rm --tty -v /path/to/project:/project pmdcode/pmd:latest \
    check -d /project/src/main/java -R rulesets/java/quickstart.xml

Writing XML report into a file

Since the bind-mount has write-access by default, you can use it as the output destination for a report file in XML format:

docker run --rm --tty -v /path/to/project:/project pmdcode/pmd:latest \
    check -d /project/src/main/java -R rulesets/java/quickstart.xml -r /project/target/pmd-report.xml -f xml

Use custom rulesets / rules

If you use a custom ruleset or rule, you need to add this onto PMD's runtime classpath. By default, the container will pick-up any jar file that is in the folder /custom-pmd-libs. That means, you just need to add another bind-mount for this:

docker run --rm --tty -v /path/to/project:/project -v /path/to/custom-rule-jars:/custom-pmd-libs \
    pmdcode/pmd:latest check -d /project/src/main/java -R rulesets/java/quickstart.xml

How to build the docker image

PMD_VERSION=7.12.0; \
export PMD_VERSION; \
docker build --load \
    --no-cache \
    --progress=plain \
    --build-arg PMD_VERSION=$PMD_VERSION \
    --tag pmdcode/pmd:$PMD_VERSION \
    --tag pmdcode/pmd:latest \
    - < Dockerfile

About

Repo containing the dockerfiles and scripts to produce the official PMD containers.

hub.docker.com/r/pmdcode/pmd

Topics

containersdockerdockerfiledockerhub

Resources

Readme
BSD-3-Clause license
Activity
Custom properties

Stars

0 stars

Watchers

4 watching

Forks

3 forks
Report repository

Packages

Used by

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.