Initial commit

This commit is contained in:
Rayhan Hanaputra
2025-10-10 22:18:06 +07:00
committed by GitHub
commit ea02892f14
1246 changed files with 289342 additions and 0 deletions
+29
View File
@@ -0,0 +1,29 @@
FROM public.ecr.aws/docker/library/php:8.0-apache
ARG PASSWORD
RUN apt-get update && apt-get install uuid net-tools vim openssh-server -y
# Create ctfuser and set password
RUN useradd -m -d /app ctfuser && echo ctfuser:${PASSWORD} | chpasswd
# Configure SSH for ctfuser
RUN echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && \
echo "PermitRootLogin no" >> /etc/ssh/sshd_config && \
echo "AllowUsers ctfuser" >> /etc/ssh/sshd_config
# Start SSH service
RUN ssh-keygen -A
RUN mkdir -p /run/sshd && chmod 755 /run/sshd
COPY app/ /var/www/html/
COPY flag.txt /flag.txt
RUN chown -R ctfuser:ctfuser /var/www/html/
RUN chown -R www-data:www-data /var/www/html/user
RUN chmod -R 740 /var/www/html/user
COPY start.sh .
RUN chmod +x start.sh
CMD service ssh start && ./start.sh