FROM ubuntu:24.04 AS builder

WORKDIR /app

RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    libssl-dev \
    libcurl4-openssl-dev

COPY . .

RUN mkdir out && \
    cd out && \
    cmake ..
RUN cmake --build out

FROM ubuntu:24.04

WORKDIR /app

RUN apt-get update && apt-get install -y \
    libssl-dev \
    libcurl4-openssl-dev

COPY --from=builder /app/out/uibi-mu .

CMD ["/app/uibi-mu"]