-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
47 lines (34 loc) · 2.11 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
39
40
41
42
43
44
45
46
ARG DEBIAN_VERSION=12
FROM debian:${DEBIAN_VERSION}
ENV DEBIAN_VERSION=12
ENV DEBIAN_FRONTEND=noninteractive
SHELL ["/bin/bash", "-c"]
RUN source /etc/os-release && apt-get update -y && apt-get install -y curl wget \
&& wget https://packages.microsoft.com/config/debian/${VERSION_ID}/packages-microsoft-prod.deb \
&& dpkg -i packages-microsoft-prod.deb \
&& rm packages-microsoft-prod.deb \
&& apt-get install -y nix-bin locales curl wget nmap nano vim msmtp msmtp-mta mutt dnsutils python3-full screen \
irssi git testdisk tcpdump tshark traceroute tftp ncftp mc yafc ftp mosh ncat openssl sqlite3 git elinks emacs \
python3-pip zsh python3-full python3-pip pipx rsync rclone zip unzip unar p7zip-full iperf3 mtr \
&& rm -rf /var/lib/apt/lists/* && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \
&& mkdir -p /home/linuxbrew/ && chmod -Rv 777 /home/linuxbrew/ && useradd -ms /usr/bin/zsh blueteam \
&& mkdir -p /nix && chown -R blueteam:blueteam /nix
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
USER blueteam
WORKDIR /home/blueteam
# FROM HERE WE START WHAT THE USER SPACE LOOKS LIKE
# Install nix channels and update
RUN nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs && nix-channel --update
ENV LANG en_US.utf8
RUN touch ~/.zshrc \
&& pipx install --include-deps ansible \
&& pipx inject --include-apps ansible argcomplete \
&& pipx ensurepath \
&& sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
&& /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" \
&& echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.zshrc \
&& echo 'export PATH="$PATH:/home/blueteam/.local/bin"' >> ~/.zshrc \
&& echo 'eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)' >> ~/.bashrc \
&& echo 'export PATH="$PATH:/home/blueteam/.local/bin"' >> ~/.bashrc
# note: https://gitee.com/chuanjiao10/kasini3000_agent_linux/raw/master/debian12_install_powershell.bash