#!/bin/bash
set -xe

cmake --build build -j 12

cat << EOF > Dockerfile
FROM debian:trixie-slim

RUN apt update -y && apt install -y --no-install-recommends gcc g++ libc6-dev ca-certificates
RUN apt remove -y --allow-remove-essential perl manpages-dev perl-base && apt autoremove -y

WORKDIR /app
CMD ["/bin/bash"]
EOF

docker build -t shrap .
rm Dockerfile

docker run --rm -it -v .:/app shrap
