FROM debian:bookworm

RUN dpkg --add-architecture amd64
RUN apt-get update

RUN apt-get install -y curl git pkg-config yasm
RUN apt-get install -y build-essential clang
RUN apt-get install -y musl-tools musl-dev musl

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
ENV PATH="/root/.cargo/bin/:${PATH}"
RUN rustup target add x86_64-unknown-linux-musl

RUN mkdir /build
ENV CARGO_TARGET_DIR /build
ENV CARGO_HOME /build/cache

RUN mkdir /src

WORKDIR /src
CMD ["/src/docker/docker-build-x86-symphonia.sh"]

