Files
attack-defense-platform/services/carbeat/Dockerfile
T

32 lines
734 B
Docker
Raw Normal View History

2025-10-25 09:53:39 +07:00
# Dockerfile
FROM ubuntu:24.04
# Build-time args
ARG PASSWORD=root
ENV DEBIAN_FRONTEND=noninteractive
2025-10-25 14:18:49 +07:00
WORKDIR /home/ctfuser/chall
2025-10-25 09:53:39 +07:00
RUN apt-get update && \
apt-get install -y --no-install-recommends \
make \
g++ \
socat \
build-essential \
openssh-server \
bash \
nano \
vim \
&& rm -rf /var/lib/apt/lists/*
2025-10-25 14:18:49 +07:00
RUN useradd -m -d /home/ctfuser -s /bin/bash ctfuser && echo "ctfuser:${PASSWORD}" | chpasswd
2025-10-25 09:53:39 +07:00
RUN mkdir -p /var/run/sshd
2025-10-25 14:18:49 +07:00
COPY chall/ /home/ctfuser/chall
2025-10-25 09:53:39 +07:00
COPY ./entrypoint.sh /entrypoint.sh
2025-10-25 14:18:49 +07:00
RUN chmod +x /entrypoint.sh /home/ctfuser/chall/run.sh && \
chown -R root:root /home/ctfuser/chall && chmod -R 555 /home/ctfuser/chall
2025-10-25 09:53:39 +07:00
EXPOSE 9000 22
CMD ["/entrypoint.sh"]