forked from HavocFramework/Havoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JT-Dockerfile
84 lines (84 loc) · 2.04 KB
/
JT-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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Jenkins LTS DOCKERFILE for Havoc-C2-teamserver
# Havoc-Teamserver
#
# Usage:
# Build the image:
# sudo docker build -t jenkins-havoc-teamserver -f JT-Dockerfile .
#
# Run the image:
# docker run -p8080:8080 -it -d -v havoc-c2-data:/Data jenkins-havoc-teamserver
#
###################################################################
FROM jenkins/jenkins:lts
#
# ---- Install via APT ----
USER root
USER jenkins
#
# ---- Establish Volumes ----
#
VOLUME /var/jenkins_home
#
# ---- Setup Jenkins ----
ENV JAVA_OPTS -Djenkins.install.runSetupWizard=false
ENV CASC_JENKINS_CONFIG /var/jenkins_home/casc.yaml
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
#
# ----Further Customize Jenkins through custom groovy scripts:----
# COPY custom.groovy /usr/share/jenkins/ref/init.groovy.d/custom.groovy
#
# ------------------Install Extra Software & Tools------------------
#
# ----Env Setup----
# RUN mkdir /Tools
# CHMOD 777 /Tools
#
# ----Build Env Stuff----
USER root
ENV PATH=/root/.local/bin:$PATH
ENV USER=root
RUN apt update \
&& apt -y install \
alien \
debhelper \
devscripts \
golang-go \
nasm \
mingw-w64 \
dh-golang \
dh-make \
fakeroot \
pkg-config \
python3-all-dev \
python3-pip \
rpm \
sudo \
upx-ucl \
wget \
&& pip install --upgrade jsonschema
#
# Build cmake as the repo version is out-of-date...
RUN wget https://github.com/Kitware/CMake/releases/download/v3.24.1/cmake-3.24.1-Linux-x86_64.sh -O cmake.sh
RUN sh cmake.sh --prefix=/usr/local/ --exclude-subdir
#
# Setting up latest Go
RUN wget https://go.dev/dl/go1.19.1.linux-amd64.tar.gz -O go1.19.1.tar.gz
RUN rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.1.tar.gz
RUN echo 'export PATH=$PATH:/usr/local/go/bin' > /var/jenkins_home/.profile
RUN rm /usr/bin/go
RUN cp /usr/local/go/bin/go /usr/bin/go
RUN go version
#
# Because Go doesn't just go...
RUN go env -w GOFLAGS=-mod=mod
#
# Install Jenkins Plugins
RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/ref/plugins.txt
#
# Copy over Havoc TeamServer files for local Build
COPY . Build/
RUN chmod -R 777 Build/
#
USER jenkins
#
#