# docker build -t dreamer . && docker run --rm -p 1337:1337 --name dreamer -dit dreamer
FROM archlinux:latest

RUN pacman -Sy --noconfirm socat gcc

WORKDIR /app

COPY  dream /app/
RUN chmod +x /app/dream
ARG FLAG=GPNCTF{fake_flag}
RUN echo "$FLAG" > flag.txt

EXPOSE 1337

ENTRYPOINT [ "socat", "tcp-l:1337,reuseaddr,fork", "EXEC:./dream,stderr" ]
