-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-Ubuntu
103 lines (85 loc) · 3.18 KB
/
Dockerfile-Ubuntu
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
FROM ubuntu:latest
LABEL maintainer="Aaron Baker"
ENV TZ=US/Chicago \
DEBIAN_FRONTEND=noninteractive
RUN apt update -y && \
apt upgrade -y && \
apt install -y curl && \
apt install -y gcc && \
apt install -y make && \
apt install -y iputils-ping && \
apt install -y openssh-server && \
apt install -y net-tools && \
apt install -y net-tools && \
apt install -y ruby && \
apt install -y perl && \
apt install -y git && \
apt install -y libedit-dev && \
apt install -y build-essential && \
apt install -y libssl-dev && \
apt install -y zlib1g-dev && \
apt install -y libbz2-dev && \
apt install -y libreadline-dev && \
apt install -y libsqlite3-dev && \
apt install -y wget && \
apt install -y llvm && \
apt install -y libncursesw5-dev && \
apt install -y xz-utils && \
apt install -y tk-dev && \
apt install -y libxml2-dev && \
apt install -y libxmlsec1-dev && \
apt install -y libffi-dev && \
apt install -y liblzma-dev && \
apt install -y python3-pip && \
apt install -y nmap
# Setting Up Mongo Start
RUN wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | apt-key add -
RUN echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-5.0.list
RUN apt update && apt install -y mongodb-mongosh
# Setting Up Mongo End
# Install goenv Start
RUN git clone https://github.com/syndbg/goenv.git ~/.goenv
RUN echo 'export GOENV_ROOT="$HOME/.goenv"' >> ~/.bashrc
RUN echo 'export PATH="$GOENV_ROOT/bin:$PATH"' >> ~/.bashrc
RUN echo 'export PATH="$GOROOT/bin:$PATH"' >> ~/.bashrc
RUN echo 'export PATH="$PATH:$GOPATH/bin"' >> ~/.bashrc
# Install goenv End
# Install Rust Start
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN echo 'source $HOME/.cargo/env' >> $HOME/.bashrc
# Install Rust End
# Pyenv Pyenv-Virtualenv Install Start
RUN git clone https://github.com/pyenv/pyenv.git ~/.pyenv
ENV PYENV_ROOT /root/.pyenv
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
RUN git clone https://github.com/pyenv/pyenv-virtualenv.git /root/.pyenv/plugins/pyenv-virtualenv
# Pyenv Install End
# Init calls needed in bashrc Start
RUN echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc
RUN echo 'eval "$(pyenv init --path)"' >> ~/.bashrc
RUN echo 'eval "$(pyenv init -)"' >> ~/.bashrc
RUN echo 'eval "$(goenv init -)"' >> ~/.bashrc
# Allows for goenv to be able to modify its own path : Thats why its needed twice.
RUN export PATH="$GOROOT/bin:$PATH"
RUN export PATH="$PATH:$GOPATH/bin"
# Init calls needed in bashrc End
# Resetting shell Start
RUN exec $SHELL
# Resetting shell End
# Installing Python 3.8.1, setting it to Global and installing pip
RUN pyenv install 3.8.1
RUN pyenv global 3.8.1
RUN python -m pip install --upgrade pip
# Installing Golang 1.20.1
# RUN goenv install 1.20.1
# RUN goenv global 1.20.1
SHELL ["/bin/bash", "-ec"]
WORKDIR /
COPY . /nightcap
COPY ./test_files /test_files
RUN sh /nightcap/INSTALLER/installer.sh
RUN python -m pip install -r /nightcap/requirements.txt
RUN chmod +x /nightcap/nightcap.py
RUN ln -s /nightcap/nightcap.py /usr/local/bin/nightcap
RUN apt clean
RUN ln -sf /bin/bash /bin/sh