quick build for a quick fix
This commit is contained in:
parent
992257a8b1
commit
f2c7454bf4
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
target
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
22
Dockerfile
22
Dockerfile
@ -1,16 +1,28 @@
|
|||||||
FROM alpine:3.19
|
FROM rust:1.77.1-buster AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY ./ ./
|
||||||
|
|
||||||
|
RUN cargo build --release
|
||||||
|
|
||||||
|
FROM debian:stable
|
||||||
|
|
||||||
ARG TARGET
|
ARG TARGET
|
||||||
|
|
||||||
RUN apk add --no-cache curl
|
RUN apt-get update
|
||||||
|
RUN apt-get install -y ca-certificates
|
||||||
|
|
||||||
RUN curl -L https://github.com/redlib-org/redlib/releases/latest/download/redlib-${TARGET}.tar.gz | \
|
RUN apt-get clean -y; \
|
||||||
tar xz -C /usr/local/bin/
|
rm -rf /var/lib/apt/lists/* /var/cache/apt/*
|
||||||
|
|
||||||
|
COPY --from=builder /app/target/release/ /usr/local/bin
|
||||||
|
|
||||||
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
|
RUN adduser --home /nonexistent --no-create-home --disabled-password redlib
|
||||||
|
|
||||||
USER redlib
|
USER redlib
|
||||||
|
|
||||||
# Tell Docker to expose port 8080
|
# Tell Docker to expose port 808
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
# Run a healthcheck every minute to make sure redlib is functional
|
# Run a healthcheck every minute to make sure redlib is functional
|
||||||
|
Loading…
Reference in New Issue
Block a user