30 lines
1.3 KiB
Docker
30 lines
1.3 KiB
Docker
# Natywne linuksowe narzedzia do obslugi obrazow konsoli.
|
|
FROM rust:1.88-bookworm AS converters
|
|
ENV CARGO_BUILD_JOBS=2
|
|
RUN git clone --depth 1 --branch v1.8.1 https://github.com/iliazeus/iso2god-rs.git /src/iso2god \
|
|
&& cd /src/iso2god && cargo build --release --locked --bin iso2god
|
|
RUN git clone --depth 1 --branch v0.8.3 https://github.com/antangelo/xdvdfs.git /src/xdvdfs \
|
|
&& cd /src/xdvdfs && cargo build --release --locked -p xdvdfs-cli
|
|
|
|
FROM golang:1.24-bookworm AS bt-helper
|
|
WORKDIR /src
|
|
COPY bt/ /src/
|
|
RUN GOMAXPROCS=2 go mod tidy && GOMAXPROCS=2 CGO_ENABLED=0 go build -p 2 -trimpath -o /out/x360-bt .
|
|
|
|
FROM python:3.12-slim-bookworm
|
|
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends aria2 p7zip-full unar chromium ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY --from=bt-helper /out/x360-bt /usr/local/bin/x360-bt
|
|
COPY --from=converters /src/iso2god/target/release/iso2god /usr/local/bin/iso2god
|
|
COPY --from=converters /src/xdvdfs/target/release/xdvdfs /usr/local/bin/xdvdfs
|
|
WORKDIR /opt/x360
|
|
COPY requirements.txt ./
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
COPY app/ app/
|
|
COPY entrypoint.sh ./
|
|
RUN chmod +x entrypoint.sh && mkdir -p /data
|
|
EXPOSE 8000
|
|
CMD ["/opt/x360/entrypoint.sh"]
|