forked from zardus/ctf-tools
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
38 lines (30 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:trusty
# 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 \
texinfo curl wget automake autoconf python python-dev git subversion \
unzip virtualenvwrapper sudo git virtualenvwrapper ca-certificates
RUN useradd -m ctf
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
COPY .git /home/ctf/tools/.git
RUN chown -R ctf.ctf /home/ctf/tools
# git checkout of the files
USER ctf
WORKDIR /home/ctf/tools
RUN git checkout .
# 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
RUN bin/manage-tools -s setup
RUN bin/ctf-tools-pip install appdirs
#RUN echo "workon ctftools" >> /home/ctf/.bashrc
RUN echo 'source $(which ctf-tools-venv-activate)' >> /home/ctf/.bashrc
WORKDIR /home/ctf
CMD bash -i