Renovator Bot
4b4534b6a3
All checks were successful
continuous-integration/drone/pr Build is passing
43 lines
1.7 KiB
Docker
43 lines
1.7 KiB
Docker
FROM node:lts-alpine3.13@sha256:bd7f3879132b126e5f6770e7e50e223c2e74c1f223d27bfd06dd71a17ebb8fc3
|
|
|
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
LABEL org.opencontainers.image.title="link-validator"
|
|
LABEL org.opencontainers.image.url="https://gitea.rknet.org/docker/link-validator"
|
|
LABEL org.opencontainers.image.source="https://gitea.rknet.org/docker/link-validator"
|
|
LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/docker/link-validator"
|
|
|
|
ARG BUILD_VERSION
|
|
# renovate: datasource=npm depName=broken-link-checker
|
|
ENV BLC_VERSION="${BUILD_VERSION:-0.7.8}"
|
|
# renovate: datasource=github-releases depName=caddyserver/caddy
|
|
ENV CADDY_VERSION="${CADDY_VERSION:-v2.4.5}"
|
|
|
|
ENV LINK_VALIDATOR_BASE_DIR=/drone/src \
|
|
LINK_VALIDATOR_SERVER_PORT=80 \
|
|
FORCE_COLOR=true \
|
|
NPM_CONFIG_LOGLEVEL=error
|
|
|
|
COPY overlay/ /
|
|
|
|
RUN echo "Installing requirements ..." && \
|
|
apk --update add --virtual .build-deps curl && \
|
|
curl -sSL "https://github.com/caddyserver/caddy/releases/download/${CADDY_VERSION}/caddy_${CADDY_VERSION##v}_linux_amd64.tar.gz" | tar xz -C /usr/local/bin caddy && \
|
|
chmod 755 /usr/local/bin/caddy && \
|
|
BLC_VERSION="${BLC_VERSION##v}" && \
|
|
BLC_MAJOR="${BLC_VERSION%%.*}" && \
|
|
if [ -z "${BLC_MAJOR//[0-9]}" ] && [ -n "$BLC_MAJOR" ]; then \
|
|
echo "Installing link-checker version '$BLC_VERSION' ..." && \
|
|
npm install -g broken-link-checker@"$BLC_VERSION"; \
|
|
else \
|
|
echo "Installing latest link-checker ..." && \
|
|
npm install -g broken-link-checker; \
|
|
fi && \
|
|
apk del .build-deps && \
|
|
rm -rf /var/cache/apk/* && \
|
|
rm -rf /tmp/*
|
|
|
|
USER root
|
|
CMD []
|
|
ENTRYPOINT ["/bin/link-validator"]
|