linkchecker/Dockerfile
Chris Mayo 3723a3ac7a Use Python:3-slim base image in Dockerfile
Currently reduces image size from 896MB to 126MB.
2020-08-31 19:18:26 +01:00

20 lines
650 B
Docker

FROM python:3-slim
# needed to allow linkchecker create plugin directory and initial configuration file in "home" dir
ENV HOME /tmp
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@master \
&& apt-get -y -qq purge git \
&& apt-get autoremove -y -qq \
&& apt-get clean -y -qq all \
&& rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/locale /usr/share/man
# /mnt enables linkchecker to access to access files on local machine if needed
VOLUME /mnt
WORKDIR /mnt
ENTRYPOINT ["linkchecker"]