forked from HavocFramework/Havoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JC-Dockerfile
74 lines (73 loc) · 2.91 KB
/
JC-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
# Jenkins LTS DOCKERFILE for Havoc-C2-client
# Havoc-Client
#
# Usage:
# Build the image:
# sudo docker build -t jenkins-havoc-client -f JCDockerfile .
#
# Create a persistent data store:
# sudo docker volume create jenkins-havoc-client
#
# Run the image:
# sudo docker run -p8080:8080 -it -d -v jenkins-havoc-client-data:/Data jenkins-havoc-client
#
############################
#
FROM jenkins/jenkins:lts
#
# ---- Install via APT ----
USER root
RUN echo 'deb http://ftp.de.debian.org/debian bookworm main' >> /etc/apt/sources.list
#
# ---- 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
#
# ------------------Install Extra Software & Tools------------------
#
# ----Env Setup----
# RUN mkdir /Tools
# CHMOD 777 /Tools
#
# ----Supporting Tooling----
USER root
# # Install Jenkins Plugins
RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/ref/plugins.txt
# one liner: apt-get update && apt-get install -y libfontconfig1 libglu1-mesa-dev libgtest-dev libspdlog-dev libboost-all-dev mesa-common-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5websockets5 libqt5websockets5-dev qtdeclarative5-dev
RUN apt-get update && apt-get install -y libfontconfig1 libglu1-mesa-dev libgtest-dev libspdlog-dev libboost-all-dev mesa-common-dev qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools libqt5websockets5 libqt5websockets5-dev qtdeclarative5-dev
# Build cmake as the repo version is out-of-date...
USER root
RUN apt install -y wget
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
#
# Install Jenkins Plugins
RUN jenkins-plugin-cli --plugin-file /usr/share/jenkins/ref/plugins.txt
#
# 'streamline' build process:
RUN apt install -y build-essential cmake make python3-dev qtbase5-dev libqt5websockets5-dev libspdlog-dev libboost-all-dev g++ gcc
# 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 cp /usr/local/go/bin/go /usr/bin/go
RUN go version
#
RUN apt install -y python3.10-dev libpython3.10 libpython3.10-dev python3.10 build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev
# Manual Python 3.10 install
#RUN wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
#RUN tar -xvf Python-3.10.0.tgz
#RUN cd Python-3.10.0 && ./configure --enable-optimizations && make -j 2 && nproc
#RUN cd Python-3.10.0 && make altinstall
#RUN python3.10 --version
#
# Copy over Havoc Client files for local build
COPY ./Client Build/
RUN chmod -R 777 Build/
#
USER jenkins