2024-03-04 19:02:06 -06:00
|
|
|
FROM alpine:3.19
|
2021-04-09 15:24:47 -07:00
|
|
|
|
2024-03-04 19:02:06 -06:00
|
|
|
ARG TARGET
|
2021-04-09 15:24:47 -07:00
|
|
|
|
2024-03-04 19:02:06 -06:00
|
|
|
RUN apk add --no-cache curl
|
2021-04-09 15:24:47 -07:00
|
|
|
|
2024-11-11 02:19:40 +01:00
|
|
|
RUN curl -L "https://github.com/redlib-org/redlib/releases/latest/download/redlib-${TARGET}.tar.gz" | \
|
2024-03-04 19:02:06 -06:00
|
|
|
tar xz -C /usr/local/bin/
|
2020-10-25 13:48:44 -07:00
|
|
|
|
2023-12-26 18:25:52 -05:00
|
|
|
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
|
|
|
|
USER redlib
|
2021-04-09 15:24:47 -07:00
|
|
|
|
|
|
|
# Tell Docker to expose port 8080
|
2021-02-24 20:17:36 +01:00
|
|
|
EXPOSE 8080
|
2021-04-09 15:24:47 -07:00
|
|
|
|
2023-12-26 18:25:52 -05:00
|
|
|
# Run a healthcheck every minute to make sure redlib is functional
|
2024-05-31 11:40:01 +02:00
|
|
|
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider -q http://localhost:8080/settings || exit 1
|
2021-04-01 12:09:08 -07:00
|
|
|
|
2024-03-04 19:02:06 -06:00
|
|
|
CMD ["redlib"]
|
|
|
|
|