mirror of
https://github.com/shiroyashik/sculptor.git
synced 2025-12-06 04:51:13 +03:00
The Assets update is now working properly on Linux
Also added a new Workflow and disabled the Rust workflow. Redesigned Dockerfile
This commit is contained in:
parent
f0599aec9e
commit
0103c31d69
13 changed files with 163 additions and 80 deletions
35
Dockerfile
35
Dockerfile
|
|
@ -1,22 +1,37 @@
|
|||
FROM rust:1.80.1-alpine3.20 as builder
|
||||
|
||||
## Chef
|
||||
# FROM clux/muslrust:stable AS chef
|
||||
FROM rust:1.81.0-alpine3.20 as chef
|
||||
USER root
|
||||
RUN apk add musl-dev libressl-dev
|
||||
RUN cargo install cargo-chef
|
||||
WORKDIR /build
|
||||
|
||||
RUN apk add musl-dev libressl-dev
|
||||
|
||||
## Planner
|
||||
FROM chef AS planner
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY src src
|
||||
RUN cargo chef prepare --recipe-path recipe.json
|
||||
|
||||
RUN cargo build --release
|
||||
|
||||
FROM alpine:3.20.0
|
||||
## Builder
|
||||
FROM chef AS builder
|
||||
COPY --from=planner /build/recipe.json recipe.json
|
||||
# Build dependencies - this is the caching Docker layer!
|
||||
RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json
|
||||
# Build application
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY src src
|
||||
RUN cargo build --release --target x86_64-unknown-linux-musl --bin sculptor
|
||||
|
||||
## Runtime
|
||||
FROM alpine:3.20.0 AS runtime
|
||||
WORKDIR /app
|
||||
COPY --from=builder /build/target/x86_64-unknown-linux-musl/release/sculptor /app/sculptor
|
||||
|
||||
COPY --from=builder /build/target/release/sculptor /app/sculptor
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ=Etc/UTC
|
||||
|
||||
VOLUME [ "/app/avatars" ]
|
||||
VOLUME [ "/app/data" ]
|
||||
VOLUME [ "/app/logs" ]
|
||||
EXPOSE 6665/tcp
|
||||
|
||||
CMD ["./sculptor"]
|
||||
CMD [ "./sculptor" ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue