Compare commits
No commits in common. "9b5252454898c18c910cdd6a5d01e14da3bed56c" and "92648d9ea4690151764f0eb04ffe71607f758855" have entirely different histories.
9b52524548
...
92648d9ea4
22
Dockerfile
22
Dockerfile
@ -1,28 +1,16 @@
|
||||
FROM rust:1.77.1-buster AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY ./ ./
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM debian:stable
|
||||
FROM alpine:3.19
|
||||
|
||||
ARG TARGET
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y ca-certificates wget
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
RUN apt-get clean -y; \
|
||||
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||
|
||||
COPY --from=builder /app/target/release/ /usr/local/bin
|
||||
RUN curl -L https://github.com/redlib-org/redlib/releases/latest/download/redlib-${TARGET}.tar.gz | \
|
||||
tar xz -C /usr/local/bin/
|
||||
|
||||
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
|
||||
|
||||
USER redlib
|
||||
|
||||
# Tell Docker to expose port 808
|
||||
# Tell Docker to expose port 8080
|
||||
EXPOSE 8080
|
||||
|
||||
# Run a healthcheck every minute to make sure redlib is functional
|
||||
|
@ -1,20 +0,0 @@
|
||||
FROM alpine:3.19
|
||||
|
||||
ARG TARGET
|
||||
|
||||
RUN apk add --no-cache curl
|
||||
|
||||
RUN curl -L https://github.com/redlib-org/redlib/releases/latest/download/redlib-${TARGET}.tar.gz | \
|
||||
tar xz -C /usr/local/bin/
|
||||
|
||||
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
|
||||
USER redlib
|
||||
|
||||
# Tell Docker to expose port 8080
|
||||
EXPOSE 8080
|
||||
|
||||
# Run a healthcheck every minute to make sure redlib is functional
|
||||
HEALTHCHECK --interval=1m --timeout=3s CMD wget --spider --q http://localhost:8080/settings || exit 1
|
||||
|
||||
CMD ["redlib"]
|
||||
|
Loading…
Reference in New Issue
Block a user