This repository has been archived on 2023-10-18. You can view files and clone it, but cannot push or open issues or pull requests.
link-validator/Dockerfile

39 lines
1.4 KiB
Docker
Raw Normal View History

2020-12-30 17:03:30 +01:00
FROM node:10-alpine@sha256:bb33b8ee56dd6b28960fbc4bc4610b8b74e1e9869e844f903a7e47ea1caf20b3
2020-05-31 21:43:54 +02:00
# due to https://github.com/http-party/http-server/issues/537
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"
2020-05-31 21:43:54 +02:00
2020-10-18 21:51:50 +02:00
ARG BUILD_VERSION
# renovate: datasource=npm depName=broken-link-checker
ENV BLC_VERSION="${BUILD_VERSION:-0.7.8}"
2020-05-31 21:43:54 +02:00
2020-10-18 21:51:50 +02:00
ENV LINK_VALIDATOR_BASE_DIR=/drone/src \
2020-06-01 21:54:09 +02:00
LINK_VALIDATOR_SERVER_PORT=80 \
2020-05-31 21:43:54 +02:00
FORCE_COLOR=true \
NPM_CONFIG_LOGLEVEL=error
COPY overlay/ /
RUN echo "Installing requirements ..." && \
npm install -g http-server && \
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 && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
USER root
CMD []
ENTRYPOINT ["/bin/link-validator"]