0
0

Updated Redlib

This commit is contained in:
Opnxng 2024-10-09 19:43:10 +08:00
parent dccc484578
commit 428eddad29

View File

@ -1,4 +1,4 @@
# Stage 1: Build the redlib binary # Build the redlib binary
FROM rust:alpine3.19 AS builder FROM rust:alpine3.19 AS builder
ARG TARGET=aarch64-unknown-linux-musl ARG TARGET=aarch64-unknown-linux-musl
@ -9,17 +9,20 @@ RUN apk add --no-cache curl git musl-dev
# Clone the redlib repository and build # Clone the redlib repository and build
RUN git clone https://github.com/redlib-org/redlib && \ RUN git clone https://github.com/redlib-org/redlib && \
cd redlib && \ cd redlib && \
sed -i 's/--accent: red;/--accent: #4385BE;/g' static/style.css && \ sed -i 's/--accent: red;/--accent: #2968AC;/g' static/style.css && \
sed -i 's/--accent: #9a0000;/--accent: #4385BE;/g' static/style.css && \ sed -i 's/--green: #5cff85;/--green: #0A8754;/g' static/style.css && \
sed -i 's/#9a0000/#4385BE/g' static/themes/light.css && \ sed -i 's/--accent: #9a0000;/--accent: #2968AC;/g' static/style.css && \
sed -i 's/#9a0000/#4385BE/g' static/themes/black.css && \ sed -i 's/#9a0000/#2968AC/g' static/themes/light.css && \
sed -i 's/red/#4385BE/g' static/themes/dark.css && \ sed -i 's/#9a0000/#2968AC/g' static/themes/black.css && \
sed -i 's/red/#2968AC/g' static/themes/dark.css && \
cargo build --release --target=${TARGET} && \ cargo build --release --target=${TARGET} && \
cp target/${TARGET}/release/redlib /usr/local/bin/redlib && \ cp target/${TARGET}/release/redlib /usr/local/bin/redlib && \
cd .. && \ cd .. && \
rm -rf redlib rm -rf redlib
# Stage 2: Create the final image ##################################################
# Create the final image
FROM alpine:3.19 FROM alpine:3.19
RUN apk add --no-cache curl RUN apk add --no-cache curl