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

43 lines
1.7 KiB
Docker
Raw Normal View History

FROM node:lts-alpine3.13@sha256:fae520c95c14bb18164c4d0ce934bbff77d933903f54868ba542c69a01ef2fc8
2020-05-31 19:43:54 +00:00
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 19:43:54 +00:00
2020-10-18 19:51:50 +00:00
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
chore(deps): update dependency caddyserver/caddy to v2.4.3 (#33) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [caddyserver/caddy](https://github.com/caddyserver/caddy) | patch | `v2.4.2` -> `v2.4.3` | --- ### Release Notes <details> <summary>caddyserver/caddy</summary> ### [`v2.4.3`](https://github.com/caddyserver/caddy/releases/v2.4.3) [Compare Source](https://github.com/caddyserver/caddy/compare/v2.4.2...v2.4.3) Guess what: this is our 100th release! :tada: :partying_face: :confetti_ball: A bug fix for the bug fix, and a couple other bug fixes, including one security fix for PHP sites. We think all users should upgrade after giving it a whirl in their test environments. Please note some changes in this patch: - :warning: **In `reverse_proxy`, the `max_idle_conns_per_host` option has been removed (both Caddyfile and JSON).** This may be a breaking change for a few of you, but it only breaks configs that relied on a bug. Instead of silently failing, you will get an error if you continue using the property. For Caddyfile, we basically renamed the property to `keepalive_idle_conns_per_host`. In JSON, we simply removed the property, and you should instead set `keep_alive/max_idle_conns_per_host` if you weren't already. Previously, the Caddyfile subdirective set both MaxConnsPerHost and MaxIdleConnsPerHost, which was confusing; and the JSON properties overwrote each other, so one was removed. Issue [#&#8203;4201](https://github.com/caddyserver/caddy/issues/4201). - **:shield: Security patch** in the FastCGI transport that now sanitizes paths against directory traversal outside the site root. PR [#&#8203;4207](https://github.com/caddyserver/caddy/issues/4207). - **:bug: Fix canonicalization redirects in `file_server`.** v2.4.2 introduced a bugfix ([#&#8203;4179](https://github.com/caddyserver/caddy/issues/4179)) for these redirects when used inside `handle_path` (i.e. rewriting the path by stripping a prefix), but caused a regression for many other use cases. This release includes a proper fix for all known, tested cases. Basically: these redirects are not issued if the filename of a path was rewritten internally. Issue [#&#8203;4205](https://github.com/caddyserver/caddy/issues/4205). #### Changelog [`9d4ed3a`](https://github.com/caddyserver/caddy/commit/9d4ed3a3) caddyhttp: Refactor and export SanitizedPathJoin for use in fastcgi ([#&#8203;4207](https://github.com/caddyserver/caddy/issues/4207)) [`e8ae80a`](https://github.com/caddyserver/caddy/commit/e8ae80ad) fileserver: Don't persist parsed template (fix [#&#8203;4202](https://github.com/caddyserver/caddy/issues/4202)) [`fbd6560`](https://github.com/caddyserver/caddy/commit/fbd65609) fileserver: Only redirect if filename not rewritten (fix [#&#8203;4205](https://github.com/caddyserver/caddy/issues/4205)) [`32c284b`](https://github.com/caddyserver/caddy/commit/32c284b5) reverseproxy: Adjust test related to [#&#8203;4201](https://github.com/caddyserver/caddy/issues/4201) [`7c68809`](https://github.com/caddyserver/caddy/commit/7c68809f) reverseproxy: Fix overwriting of max_idle_conns_per_host (closes [#&#8203;4201](https://github.com/caddyserver/caddy/issues/4201)) </details> --- ### Configuration 📅 **Schedule**: At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box. --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). Reviewed-on: https://gitea.rknet.org/docker/link-validator/pulls/33 Co-authored-by: Renovator Bot <renovator@rknet.org> Co-committed-by: Renovator Bot <renovator@rknet.org>
2021-06-18 20:03:01 +00:00
ENV CADDY_VERSION="${CADDY_VERSION:-v2.4.3}"
2020-05-31 19:43:54 +00:00
2020-10-18 19:51:50 +00:00
ENV LINK_VALIDATOR_BASE_DIR=/drone/src \
2020-06-01 19:54:09 +00:00
LINK_VALIDATOR_SERVER_PORT=80 \
2020-05-31 19:43:54 +00:00
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 && \
2020-05-31 19:43:54 +00:00
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 && \
2020-05-31 19:43:54 +00:00
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
USER root
CMD []
ENTRYPOINT ["/bin/link-validator"]