Update Dockerfile

Remove curl from releases and try curl from main
This commit is contained in:
LucifersCircle 2024-11-29 00:06:27 -08:00
parent 1b2fcc8ce4
commit 4d74e2f94d

View file

@ -1,11 +1,12 @@
FROM alpine:3.19 FROM alpine:3.19
ARG TARGET ARG TARGET=x86_64-unknown-linux-musl
RUN apk add --no-cache curl RUN apk add --no-cache curl tar
RUN curl -L "https://github.com/redlib-org/redlib/releases/latest/download/redlib-${TARGET}.tar.gz" | \ # Download the latest artifact from the main branch and extract it
tar xz -C /usr/local/bin/ RUN curl -L "https://github.com/LucifersCircle/redlib/archive/refs/heads/main.tar.gz" | \
tar --strip-components=1 -xz -C /usr/local/bin/ redlib-main/target/${TARGET}/redlib
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
USER redlib USER redlib
@ -17,4 +18,3 @@ EXPOSE 8080
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider -q http://localhost:8080/settings || exit 1 HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider -q http://localhost:8080/settings || exit 1
CMD ["redlib"] CMD ["redlib"]