FROM debian:bookworm-slim

RUN apt-get update \
  && apt-get install -y --no-install-recommends \
    ca-certificates \
    curl \
    jq \
    git \
    build-essential \
    pkg-config \
    libssl-dev \
    libclang-dev \
    llvm \
    unzip \
  && rm -rf /var/lib/apt/lists/*

RUN useradd -m -u 1000 foundry
USER foundry
WORKDIR /home/foundry
ENV SHELL=/bin/bash
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8

RUN curl -L https://foundry.paradigm.xyz | bash \
  && /home/foundry/.foundry/bin/foundryup

ENV PATH="/home/foundry/.foundry/bin:${PATH}"
WORKDIR /workspace
