FROM gcc:14

WORKDIR /work

RUN apt-get update && \
    apt-get install -y --no-install-recommends python3 xxd file gdb && \
    rm -rf /var/lib/apt/lists/*

COPY entry.c /work/entry.c

# -O1: ASAN-recommended. -fno-omit-frame-pointer: readable stacks.
RUN gcc -O1 -g -fsanitize=address -fno-omit-frame-pointer \
        -o /work/entry /work/entry.c

CMD ["/bin/bash"]
