Skip to content

Commit 88d0645

Browse files
committed
dockerfile
1 parent 9219711 commit 88d0645

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

.dockerignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*
2+
!.git

Dockerfile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from ubuntu:trusty
2+
3+
4+
RUN adduser ctf
5+
COPY .git /home/ctf/tools/.git
6+
RUN chown -R ctf.ctf /home/ctf/tools
7+
8+
RUN echo "ctf ALL=NOPASSWD: ALL" > /etc/sudoers.d/ctf
9+
RUN apt-get update
10+
RUN apt-get -y install git virtualenvwrapper
11+
12+
USER ctf
13+
14+
WORKDIR /home/ctf/tools
15+
RUN git checkout .
16+
RUN bin/manage-tools -s setup
17+
18+
WORKDIR /home/ctf
19+
RUN bash -c "source /etc/bash_completion.d/virtualenvwrapper && mkvirtualenv ctf"
20+
RUN echo "workon ctf" >> /home/ctf/.bashrc
21+
22+
ENTRYPOINT bash -i

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,24 @@ manage-tools search preload
9898
Where possible, the tools keep the installs very self-contained (i.e., in to tool/ directory), and most uninstalls are just calls to `git clean` (**NOTE**, this is **NOT** careful; everything under the tool directory, including whatever you were working on, is blown away during an uninstall).
9999
To support python dependencies, however, make sure to create a virtualenv before installing and using tools (i.e., `mkvirtualenv ctf`).
100100

101+
## Docker/Vagrant
102+
103+
By popular demand, a Dockerfile has been included.
104+
You can build a docker image with:
105+
106+
```bash
107+
git clone https://github.com/zardus/ctf-tools
108+
docker build -t ctf-tools
109+
```
110+
111+
And run it with:
112+
113+
```bash
114+
docker run -it ctf-tools
115+
```
116+
117+
A Vagrantfile is on the TODO list :-)
118+
101119
## Adding Tools
102120

103121
To add a tool (say, named *toolname*), do the following:

0 commit comments

Comments
 (0)