FROM docker.gitea.com/runner-images:ubuntu-24.04

ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && apt-get -y install wget curl cmake ninja-build make tar gzip


WORKDIR /root

COPY --chmod=755 cmake-cross /usr/local/bin/cmake-cross

RUN mkdir -p /opt/cross && wget https://downloads.tesses.net/cache/my-compilers/riscv64-unknown-linux-gnu.tar.gz && tar -C /opt/cross -xzf riscv64-unknown-linux-gnu.tar.gz && rm riscv64-unknown-linux-gnu.tar.gz