Maintenance

  • Home
  • Log in
  • « ImageMagick problems on Ubuntu 20.04
  • New lab builds coming along »

Docker container for link checking

Posted by mholmes on 01 Oct 2020 in Announcements

I was able to get the W3C checklink tool working as a Docker container after modifying the Dockerfile found at https://github.com/stupchiy/docker-w3c-checklink/blob/master/Dockerfile to add some missing dependencies; this is my working file:

FROM ubuntu

MAINTAINER Sergiy Tupchiy <stupchiy@gmail.com>

# Install dependencies required for link-checker distribution installation
RUN apt-get update && apt-get install -y \
      cpanminus \
      make \
      build-essential \
      libssl-dev \
      curl \
      libnet-ssleay-perl \
  && rm -rf /var/lib/apt/lists/*

ENV CHECKLINK_VERSION 4_81

ARG CHECKLINK_URL=https://github.com/w3c/link-checker/archive/checklink-${CHECKLINK_VERSION}.tar.gz

RUN set -x \
  && curl -sSL ${CHECKLINK_URL} -o /tmp/link-checker.tar.gz \
  && mkdir -p /usr/src \
  && tar -xzf /tmp/link-checker.tar.gz -C /usr/src \
  && rm /tmp/link-checker.tar.gz \
  && cd /usr/src/link-checker-checklink-${CHECKLINK_VERSION} \
  && cpanm --installdeps . \
  && cpanm IO::Socket::SSL \
  && cpanm LWP::Protocol::https \
  && perl Makefile.PL \
  && make \
  && make test \
  && make install \
  && rm -rf /usr/src/link-checker-checklink-${CHECKLINK_VERSION}

ENTRYPOINT ["/usr/local/bin/checklink"]
CMD ["-h"]

I'm now able to run it using:

docker run -it --rm link-checker checklink -H --recursive https://mapoflondon.uvic.ca > report.html

The plan is to build a complete local copy of e.g. MoEML and then start a Python simple server there, and point the link checker at it.

This entry was posted by Martin and filed under Announcements.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2022 by admin • Help • Bootstrap CMS