# NOTE: This hash is pinned to avoid version and environment differences.
FROM ubuntu:24.04@sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782 AS base
ENV DEBIAN_FRONTEND=nointeractive

WORKDIR /app
ADD --chmod=755 build/challenge run
ADD --chmod=644 build/flag.txt .
RUN mv flag.txt flag-$(md5sum flag.txt | awk '{print $1}').txt

FROM pwn.red/jail
COPY --from=base / /srv
ENV JAIL_TIME=60 JAIL_CPU=100 JAIL_MEM=10M
