lychee/Dockerfile-CI.alpine.Dockerfile
axel-kah d0c5af9acf
Harmonizes naming pattern of pre-built binaries and unlocks latest permalink (#1464)
* ci: enables permalink for download of latest gh release assets

removes tag names to unlock latest-permalink

* ci: fix inconsistent gh release asset naming

changes macos and windows release assets to follow linux naming scheme: lychee-{cpu}-{platform}.{ext}

* ci: fix inconsistent asset naming of nightly builds

* ci: simplifies Dockerfiles by using latest permalink

* ci: adds comment to keep dependent files in sync
2024-08-06 18:04:57 +02:00

24 lines
797 B
Docker

FROM alpine:latest as builder
WORKDIR /builder
RUN apk update \
&& apk add --no-cache ca-certificates jq wget \
&& case $(arch) in \
"x86_64") \
wget -4 -q -O - https://github.com/lycheeverse/lychee/releases/latest/download/lychee-x86_64-unknown-linux-musl.tar.gz | tar -xz lychee \
;; \
"aarch64") \
wget -4 -q -O - https://github.com/lycheeverse/lychee/releases/latest/download/lychee-arm-unknown-linux-musleabihf.tar.gz | tar -xz lychee \
;; \
esac \
&& chmod +x lychee
FROM alpine:latest
RUN apk add --no-cache ca-certificates tzdata \
&& addgroup -S lychee \
&& adduser -D -G lychee -S lychee
COPY --from=builder /builder/lychee /usr/local/bin/lychee
# Run as non-root user
USER lychee
ENTRYPOINT [ "/usr/local/bin/lychee" ]