initial
This commit is contained in:
		
						commit
						41c979e496
					
				
							
								
								
									
										159
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										159
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,159 @@ | ||||
| FROM ubuntu:24.04 | ||||
| 
 | ||||
| # Disable interactive prompts during package installs | ||||
| ENV DEBIAN_FRONTEND=noninteractive | ||||
| 
 | ||||
| # update system to latest | ||||
| RUN apt-get update && apt-get upgrade -y | ||||
| 
 | ||||
| # Install necessary packages | ||||
| RUN apt-get update && apt-get install -y \ | ||||
|     net-tools \ | ||||
|     iproute2 \ | ||||
|     traceroute \ | ||||
|     tcptraceroute \ | ||||
|     mtr \ | ||||
|     iputils-ping \ | ||||
|     iputils-tracepath \ | ||||
|     dnsutils \ | ||||
|     curl \ | ||||
|     wget \ | ||||
|     nmap \ | ||||
|     tcpdump \ | ||||
|     hping3 \ | ||||
|     ethtool \ | ||||
|     netcat-traditional \ | ||||
|     bridge-utils \ | ||||
|     arping \ | ||||
|     iftop \ | ||||
|     iptraf-ng \ | ||||
|     speedtest-cli \ | ||||
|     vlan \ | ||||
|     lsof \ | ||||
|     socat \ | ||||
|     vim \ | ||||
|     nano \ | ||||
|     python3 \ | ||||
|     python3-pip \ | ||||
|     golang-go \ | ||||
|     build-essential \ | ||||
|     ca-certificates \ | ||||
|     byobu \ | ||||
|     tmux \ | ||||
|     ninja-build \ | ||||
|     gettext \ | ||||
|     libtool \ | ||||
|     libtool-bin \ | ||||
|     autoconf \ | ||||
|     automake \ | ||||
|     cmake \ | ||||
|     g++ \ | ||||
|     pkg-config \ | ||||
|     unzip \ | ||||
|     doxygen \ | ||||
|     zsh \ | ||||
|  && rm -rf /var/lib/apt/lists/* | ||||
| 
 | ||||
| # ---------------------------- | ||||
| # Install NVM, Node.js, and Yarn | ||||
| # ---------------------------- | ||||
| ENV NVM_DIR=/root/.nvm | ||||
| ENV NODE_VERSION=20.9.0 | ||||
| 
 | ||||
| RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \ | ||||
|     . "$NVM_DIR/nvm.sh" && \ | ||||
|     nvm install $NODE_VERSION && \ | ||||
|     nvm alias default $NODE_VERSION && \ | ||||
|     nvm use default && \ | ||||
|     npm install -g yarn | ||||
| 
 | ||||
| # Ensure Node and Yarn binaries are in PATH | ||||
| ENV PATH=$NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH | ||||
| 
 | ||||
| # ---------------------------- | ||||
| # Configure Go environment and install Go CLI utilities (using commit hashes) | ||||
| # ---------------------------- | ||||
| ENV GOPATH=/usr/local/go | ||||
| ENV PATH=$PATH:$GOPATH/bin | ||||
| 
 | ||||
| # Install gotop v4.1.0 (Released on February 3, 2021) | ||||
| RUN git clone https://github.com/xxxserxxx/gotop.git && \ | ||||
|     cd gotop && \ | ||||
|     git checkout 66b6ce1 && \ | ||||
|     go install && \ | ||||
|     cd .. && \ | ||||
|     rm -rf gotop | ||||
| 
 | ||||
| # Install ctop v0.7.6 (Released on June 10, 2021) | ||||
| RUN git clone https://github.com/bcicen/ctop.git && \ | ||||
|     cd ctop && \ | ||||
|     git checkout 8f0c9f5 && \ | ||||
|     go install && \ | ||||
|     cd .. && \ | ||||
|     rm -rf ctop | ||||
| 
 | ||||
| # Install gping v1.2.3 (Released on October 15, 2022) | ||||
| RUN git clone https://github.com/orf/gping.git && \ | ||||
|     cd gping && \ | ||||
|     git checkout 4d2a5e5 && \ | ||||
|     go install && \ | ||||
|     cd .. && \ | ||||
|     rm -rf gping | ||||
| 
 | ||||
| # ---------------------------- | ||||
| # Install Rust and Rust-based utilities (using commit hashes) | ||||
| # ---------------------------- | ||||
| RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y | ||||
| ENV PATH=/root/.cargo/bin:$PATH | ||||
| 
 | ||||
| # Install bandwhich v0.20.0 (Released on March 15, 2023) | ||||
| RUN git clone https://github.com/imsnif/bandwhich.git && \ | ||||
|     cd bandwhich && \ | ||||
|     git checkout 9b5d3c1 && \ | ||||
|     cargo install --path . && \ | ||||
|     cd .. && \ | ||||
|     rm -rf bandwhich | ||||
| 
 | ||||
| # Install btm v0.8.1 (Released on May 20, 2023) | ||||
| RUN git clone https://github.com/ClementTsang/bottom.git && \ | ||||
|     cd bottom && \ | ||||
|     git checkout 7c5c9e2 && \ | ||||
|     cargo install --path . && \ | ||||
|     cd .. && \ | ||||
|     rm -rf bottom | ||||
| 
 | ||||
| # ---------------------------- | ||||
| # Install Neovim with Python3 support | ||||
| # ---------------------------- | ||||
| RUN git clone https://github.com/neovim/neovim.git && \ | ||||
|     cd neovim && \ | ||||
|     git checkout stable && \ | ||||
|     make CMAKE_BUILD_TYPE=Release && \ | ||||
|     make install && \ | ||||
|     cd .. && \ | ||||
|     rm -rf neovim | ||||
| 
 | ||||
| # Install Python support for Neovim | ||||
| RUN pip3 install pynvim | ||||
| 
 | ||||
| # ---------------------------- | ||||
| # Configure Neovim with GitHub Copilot and ChatGPT plugins | ||||
| # ---------------------------- | ||||
| RUN mkdir -p ~/.config/nvim/pack/plugins/start | ||||
| 
 | ||||
| # Install GitHub Copilot plugin | ||||
| RUN git clone https://github.com/github/copilot.vim.git ~/.config/nvim/pack/plugins/start/copilot.vim | ||||
| 
 | ||||
| # Install ChatGPT plugin | ||||
| RUN git clone https://github.com/CopilotC-Nvim/CopilotChat.nvim.git ~/.config/nvim/pack/plugins/start/CopilotChat.nvim | ||||
| 
 | ||||
| # Create Neovim configuration file | ||||
| RUN echo 'set runtimepath+=~/.config/nvim/pack/plugins/start/*' > ~/.config/nvim/init.vim && \ | ||||
|     echo 'filetype plugin indent on' >> ~/.config/nvim/init.vim && \ | ||||
|     echo 'syntax on' >> ~/.config/nvim/init.vim && \ | ||||
|     echo 'let g:copilot_no_tab_map = v:true' >> ~/.config/nvim/init.vim && \ | ||||
|     echo 'imap <silent><script><expr> <C-J> copilot#Accept("")' >> ~/.config/nvim/init.vim && \ | ||||
|     echo 'let g:copilot_filetypes = {"*": v:true}' >> ~/.config/nvim/init.vim && \ | ||||
|     echo 'lua require("copilot_chat").setup()' >> ~/.config/nvim/init.vim | ||||
| 
 | ||||
| CMD ["/bin/bash"] | ||||
							
								
								
									
										4
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								Makefile
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| default: build | ||||
| 
 | ||||
| build: | ||||
| 	docker build -t sneak/sysadmin-toolkit . | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user