mirror of
https://github.com/Bluemangoo/sekai-unpacker.git
synced 2026-09-20 00:06:52 +08:00
dockerfile, modify it when using
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
FROM rust:slim-bookworm AS builder
|
||||
WORKDIR /usr/src/app
|
||||
RUN cargo build --release
|
||||
RUN apt-get update && apt-get install -y musl-tools pkg-config libssl-dev
|
||||
RUN rustup target add x86_64-unknown-linux-musl
|
||||
COPY . .
|
||||
RUN cargo build --target x86_64-unknown-linux-musl --release --bin client
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0-bookworm-slim AS assetstudio-builder
|
||||
WORKDIR /src
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
RUN git clone --depth 1 --single-branch --branch sekai-modify https://github.com/Team-Haruki/AssetStudio.git
|
||||
RUN cd AssetStudio/AssetStudioCLI && \
|
||||
dotnet publish -c Release -r linux-x64 -f net9.0 --self-contained true -o /app/assetstudio \
|
||||
-p:PublishTrimmed=false \
|
||||
-p:PublishSingleFile=true \
|
||||
-p:IncludeNativeLibrariesForSelfExtract=true
|
||||
|
||||
FROM mwader/static-ffmpeg:7.1.1 AS ffmpeg-builder
|
||||
|
||||
FROM debian:trixie-slim
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
tzdata \
|
||||
libicu76 \
|
||||
libxml2 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/target/release/server /app/server
|
||||
COPY --from=assetstudio-builder /app/assetstudio /app/server
|
||||
COPY --from=ffmpeg-builder /ffmpeg /usr/local/bin/ffmpeg
|
||||
RUN ln -sf /app/assetstudio/AssetStudioModCLI /app/assetstudio/AssetStudioCLI && \
|
||||
mkdir -p logs
|
||||
|
||||
ENV TZ=Asia/Shanghai \
|
||||
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["./server"]
|
||||
Reference in New Issue
Block a user