FROM rust:latest AS builder
# Install MUSL tools and dependencies
RUN apt-get update && apt-get install -y musl-tools musl-dev
# Add the MUSL target
RUN rustup target add x86_64-unknown-linux-musl
# Set the working directory
WORKDIR /usr/src/odd-box
# Copy the project files
COPY . .
# Build the project with the MUSL target
RUN cargo build --release --target=x86_64-unknown-linux-musl