30 lines
961 B
Docker
30 lines
961 B
Docker
FROM ubuntu:24.04
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates curl git build-essential python3 python3-pip time jq \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /work
|
|
|
|
# Install rustup + stable toolchain (records exact rustc version in results)
|
|
RUN curl -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
# Fetch compiler source (raw)
|
|
RUN mkdir -p /src/rust \
|
|
&& curl -fsSL "https://git.seppjm.com/seppdroid/cowc/raw/branch/main/cowc.rs" \
|
|
-o /src/rust/cowc.rs
|
|
|
|
# Build cowc
|
|
RUN rustc -O /src/rust/cowc.rs -o /usr/local/bin/cowc
|
|
|
|
# Fetch apps repo
|
|
RUN git clone --depth=1 https://git.seppjm.com/seppdroid/COW-Apps.git /apps
|
|
|
|
RUN python3 -m pip install --no-cache-dir --break-system-packages psutil >/dev/null 2>&1 || true
|
|
|
|
ENV COMPILER_KIND=rust
|
|
ENV APPS_DIR=/apps
|
|
ENV RUST_COMPILER=/usr/local/bin/cowc |