mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-03-24 01:40:23 +00:00
25 lines
786 B
Docker
25 lines
786 B
Docker
# Use the maximum version for which dependency wheels are available
|
|
FROM python:3.9-slim
|
|
|
|
# linkchecker creates ~/.linkchecker/ (700) containing linkcheckerrc et al
|
|
ENV HOME /tmp
|
|
|
|
# Enables access to local files when run with -v "$PWD":/mnt
|
|
VOLUME /mnt
|
|
|
|
WORKDIR /mnt
|
|
|
|
# Dependencies change on their own schedule so install them separately
|
|
RUN pip install --no-cache-dir \
|
|
beautifulsoup4 dnspython pyxdg requests cchardet polib
|
|
|
|
RUN set -x \
|
|
&& apt-get update -qq \
|
|
&& apt-get install -y -qq --no-install-recommends git \
|
|
&& pip install --no-cache-dir git+https://github.com/linkchecker/linkchecker.git \
|
|
&& apt-get -y -qq purge git \
|
|
&& apt-get autoremove -y -qq \
|
|
&& apt-get clean -y -qq all \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENTRYPOINT ["linkchecker"]
|