fix several bugs

This commit is contained in:
DioCrafts
2025-04-10 01:43:25 +02:00
parent 9e73d50a44
commit 5d67bc4d84
19 changed files with 335 additions and 113 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
FROM rust:1.85-alpine AS cacher
WORKDIR /app
RUN apk --no-cache upgrade && \
apk add --no-cache musl-dev openssl-dev pkgconfig postgresql-dev
apk add --no-cache musl-dev pkgconfig postgresql-dev gcc perl make
COPY Cargo.toml Cargo.lock ./
# Create a minimal project to download and cache dependencies
RUN mkdir -p src && \
@@ -14,7 +14,7 @@ RUN mkdir -p src && \
FROM rust:1.85-alpine AS builder
WORKDIR /app
RUN apk --no-cache upgrade && \
apk add --no-cache musl-dev openssl-dev pkgconfig postgresql-dev
apk add --no-cache musl-dev pkgconfig postgresql-dev gcc perl make
# Copy cached dependencies
COPY --from=cacher /app/target target
COPY --from=cacher /usr/local/cargo /usr/local/cargo
@@ -30,7 +30,7 @@ RUN cargo build --release
FROM alpine:3.21.3
# Install only necessary runtime dependencies and update packages
RUN apk --no-cache upgrade && \
apk add --no-cache libgcc openssl ca-certificates libpq tzdata
apk add --no-cache libgcc ca-certificates libpq tzdata
# Copy only the compiled binary
COPY --from=builder /app/target/release/oxicloud /usr/local/bin/