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

38 lines
1.2 KiB
Docker
Raw Normal View History

2020-05-31 19:43:54 +00:00
FROM node:10-alpine
# due to https://github.com/http-party/http-server/issues/537
LABEL maintainer="Robert Kaussow <mail@geeklabor.de>" \
org.label-schema.name="link-validator" \
org.label-schema.vcs-url="https://gitea.rknet.org/docker/link-validator" \
org.label-schema.vendor="Robert Kaussow" \
org.label-schema.schema-version="1.0"
ARG BUILD_VERSION=latest
ENV BLC_VERSION="${BUILD_VERSION:-latest}" \
LINK_VALIDATOR_BASE_DIR=/drone/src \
LINK_VALIDATOR_SERVER_ADDRESS=127.0.0.1 \
LINK_VALIDATOR_SERVER_PORT=8000 \
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"]