# NOTE: This hash is pinned to avoid version and environment differences.
FROM ubuntu:24.04@sha256:c35e29c9450151419d9448b0fd75374fec4fff364a27f176fb458d472dfc9e54
ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -yqq socat
ADD --chmod=555 ./chal /chal
ADD --chmod=444 ./flag.txt /flag.txt

USER nobody:nogroup

CMD ["socat", "TCP-L:12346,fork,reuseaddr", "EXEC:/chal,stderr"]