UmbrellaDocs / linkspector

Uncover broken links in your content.
Apache License 2.0
59 stars 8 forks source link

Create a Dockerfile #8

Closed gaurav-nelson closed 3 months ago

gaurav-nelson commented 11 months ago

Create a Dockerfile to run Linkspector in a Docker image.

dotarjun commented 11 months ago

I'd like to give this a shot

gaurav-nelson commented 10 months ago

Thank you @dotarjun

I was testing with the following Dockerfile, feel free to innovate:

FROM alpine

RUN apk add --update --no-cache \
      git \
      chromium \
      nss \
      freetype \
      harfbuzz \
      ca-certificates \
      ttf-freefont \
      nodejs \
      curl

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser
ENV PNPM_HOME=/usr/local/bin

RUN curl -L https://unpkg.com/@pnpm/self-installer | node
RUN pnpm i -g puppeteer @umbrelladocs/linkspector

RUN addgroup -S pptruser && adduser -S -G pptruser pptruser \
    && mkdir -p /home/pptruser/Downloads /app \
    && chown -R pptruser:pptruser /home/pptruser \
    && chown -R pptruser:pptruser /app

USER pptruser
dotarjun commented 10 months ago

hey, pls assign me first

gaurav-nelson commented 9 months ago

https://github.com/UmbrellaDocs/linkspector/discussions/11