2022-02-28 08:33:01 +00:00
|
|
|
FROM ubuntu:focal
|
2015-11-04 02:27:49 +00:00
|
|
|
|
2018-04-20 13:21:06 +00:00
|
|
|
# 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
|
|
|
|
|
2022-03-01 10:01:58 +00:00
|
|
|
RUN apt-get-install build-essential libtool g++ gcc rubygems \
|
2022-03-01 18:54:27 +00:00
|
|
|
texinfo curl wget automake autoconf python python-dev python3-dev git \
|
|
|
|
unzip virtualenvwrapper sudo git subversion virtualenvwrapper ca-certificates
|
2016-06-06 14:27:52 +00:00
|
|
|
|
2016-06-06 14:29:46 +00:00
|
|
|
RUN useradd -m ctf
|
2018-04-20 13:21:06 +00:00
|
|
|
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
|
|
|
|
|
2015-11-04 02:27:49 +00:00
|
|
|
COPY .git /home/ctf/tools/.git
|
|
|
|
RUN chown -R ctf.ctf /home/ctf/tools
|
|
|
|
|
2018-04-20 13:21:06 +00:00
|
|
|
# git checkout of the files
|
2015-11-04 02:27:49 +00:00
|
|
|
USER ctf
|
|
|
|
WORKDIR /home/ctf/tools
|
|
|
|
RUN git checkout .
|
2018-04-20 13:21:06 +00:00
|
|
|
|
|
|
|
# add non-commited scripts
|
|
|
|
USER root
|
|
|
|
COPY bin/manage-tools /home/ctf/tools/bin/
|
|
|
|
COPY bin/ctf-tools-pip /home/ctf/tools/bin/
|
|
|
|
COPY bin/ctf-tools-venv-activate /home/ctf/tools/bin/
|
|
|
|
COPY bin/ctf-tools-venv-activate3 /home/ctf/tools/bin/
|
|
|
|
RUN chown -R ctf.ctf /home/ctf/tools
|
|
|
|
|
|
|
|
# finally run ctf-tools setup
|
|
|
|
USER ctf
|
2015-11-04 02:27:49 +00:00
|
|
|
RUN bin/manage-tools -s setup
|
2017-02-05 17:13:29 +00:00
|
|
|
RUN bin/ctf-tools-pip install appdirs
|
2018-04-20 13:21:06 +00:00
|
|
|
#RUN echo "workon ctftools" >> /home/ctf/.bashrc
|
|
|
|
RUN echo 'source $(which ctf-tools-venv-activate)' >> /home/ctf/.bashrc
|
2015-11-04 02:27:49 +00:00
|
|
|
|
|
|
|
WORKDIR /home/ctf
|
2017-02-16 21:46:25 +00:00
|
|
|
CMD bash -i
|