2
0
Fork 0
mirror of https://github.com/zardus/ctf-tools synced 2025-03-14 22:06:58 +00:00
ctf-tools/Dockerfile
2025-03-09 01:39:32 -07:00

33 lines
995 B
Docker

FROM ubuntu:noble
# wrapper script for apt-get
COPY .docker/apt-get-install /usr/local/bin/apt-get-install
RUN chmod +x /usr/local/bin/apt-get-install
RUN apt-get-install build-essential libtool g++ gcc rubygems \
texinfo curl wget automake autoconf python3 python3-dev git \
unzip virtualenvwrapper sudo git subversion virtualenvwrapper ca-certificates
RUN useradd -m ctf
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
# a bit weird so that we don't invalidate this cache unless manage-tools changes
USER ctf
WORKDIR /home/ctf/tools
ADD --chown=ctf:ctf bin/manage-tools /home/ctf/tools/bin/manage-tools
RUN bin/manage-tools -s setup && rm bin/manage-tools
# now check out the repo and re-copy the script if modified
ADD --chown=ctf:ctf .git /home/ctf/tools/.git
RUN git checkout .
COPY bin/manage-tools /home/ctf/tools/bin/manage-tools
ARG PREINSTALL=""
RUN <<END
for TOOL in $PREINSTALL
do
/home/ctf/tools/bin/manage-tools -s -v install $TOOL
done
END
WORKDIR /home/ctf