-
-
Notifications
You must be signed in to change notification settings - Fork 199
Expand file tree
/
Copy pathDockerfile-CI.alpine.Dockerfile
More file actions
27 lines (23 loc) · 928 Bytes
/
Dockerfile-CI.alpine.Dockerfile
File metadata and controls
27 lines (23 loc) · 928 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM alpine:latest AS builder
WORKDIR /builder
ARG LYCHEE_VERSION="latest"
RUN apk add --no-cache ca-certificates jq wget \
&& ARCH=$(case $(arch) in \
"x86_64") echo "x86_64";; \
"aarch64") echo "aarch64";; \
*) echo "Unsupported architecture" && exit 1;; \
esac) \
&& BASE_URL=$(case $LYCHEE_VERSION in \
"latest") echo "https://github.com/lycheeverse/lychee/releases/latest/download";; \
*) echo "https://github.com/lycheeverse/lychee/releases/download/$LYCHEE_VERSION";; \
esac) \
&& wget -O - "$BASE_URL/lychee-$ARCH-unknown-linux-musl.tar.gz" | tar -xz lychee \
&& 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" ]