Published on October 30, 2015
Author Waqar Ali Zaidi
Notice: This post is more than a year old. Some of the content might be outdated.

LinkChecker - Dockerized

The reason for dockerizing LinkChecker is to facilitate Eficode Praqma’s Gijeli set-up and produce reports for web projects. There are other Docker images of LinkChecker out there, but we find them lacking when it comes to entertaining stable automated builds.

Any change applied to the image will trigger a new Jenkins job and the build process will tag each release with a version number.

Background

GiJeli is a word made up as a contraction of Git, Jekyll and Liquid

Jekyll is a Ruby gem that renders Markdown and Liquid to static HTML pages.

  • Jekyll is the stand-alone engine that drives GitHub pages.
  • By running Jekyll you can effectively have an equivalent to GitHub pages anywhere.

Resources

Pulling LinkChecker Docker Image

All versions will be available at Eficode Praqma’s Docker Hub.

  docker pull praqma/linkchecker:v[version number]

Usage

linux / iOS:

    docker run -v $(pwd):/data praqma/linkchecker:v[version number] [Options] [Output Options] [URL]

Windows:

    docker run -v /$(pwd):\\data praqma/linkchecker:v[version number] [Options] [Output Options] [URL]

Example

Using the LinkChecker Docker image we want to produce a report for http://www.yourURL.com/ in CSV format named linkchecker.report.csv and place it in /your-project/your-report-folder/. To achieve this, the following steps will be taken:

  1. cd to your-project directory
  2. Create your-report-folder with write privileges. mkdir -p -m 777 your-report-folder
  3. Run the LinkChecker Docker image with the following command:
docker run -v $(pwd):/data praqma/linkchecker:v1 --check-css --check-html --complete --anchors -F=csv/your-report-folder/linkchecker.report.csv http://www.yourURL.com/

Have a cup of coffee or tea while you wait for your report to be generated. We are using Jenkins jobs to automate report production for our jekyll web projects. Don’t forget to read our extra article for a deeper dive into generating and publishing LinkChecker reports.

For a detailed overview of LinkChecker options see the documentation

Related Stories

Related Stories

×

Get started with Serverless Jenkins X

A crash course in Jenkins X and how to test it out on a local Kubernetes cluster

Tutorial: Snapshotting Persistent Volume Claims in Kubernetes

Sneak peak at CSI Volume snapshotting Alpha feature