120 lines
3.9 KiB
Docker
120 lines
3.9 KiB
Docker
FROM ubuntu:24.04
|
|
|
|
# Disable interactive prompts during package installs
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# localize ubuntu mirror using geoip
|
|
RUN apt-get update && apt-get install -y curl jq bash
|
|
RUN curl -fsSL https://git.eeqj.de/sneak/ubuntulocal/raw/branch/main/updatemirror.sh | bash
|
|
|
|
RUN apt-get update && apt-get upgrade -y
|
|
|
|
ADD 24.04.packages.txt /tmp/packages.txt
|
|
|
|
RUN apt-get update && apt-cache rdepends pcp
|
|
|
|
# Install necessary packages
|
|
RUN apt-get update && for PKG in $(cat /tmp/packages.txt) ; do echo ===== installing $PKG ==== ; apt-get install -y $PKG ; done
|
|
|
|
RUN apt-get install -y \
|
|
linux-tools-common \
|
|
linux-tools-$(uname -r) \
|
|
linux-tools-generic
|
|
|
|
RUN 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 main as of 2025-03-29
|
|
RUN git clone https://github.com/xxxserxxx/gotop.git && \
|
|
cd gotop && \
|
|
git checkout 06c04f588c74484c25c31f1b7ce07f9fa6b512fa && \
|
|
go install && \
|
|
cd .. && \
|
|
rm -rf gotop
|
|
|
|
# Install ctop main as of 2025-03-29
|
|
RUN git clone https://github.com/bcicen/ctop.git && \
|
|
cd ctop && \
|
|
git checkout 59f00dd6aaebf48f3bc501e174f75f815c2619f0 && \
|
|
go install && \
|
|
cd .. && \
|
|
rm -rf ctop
|
|
|
|
# ----------------------------
|
|
# 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 main as of 2025-03-29
|
|
RUN git clone https://github.com/imsnif/bandwhich.git && \
|
|
cd bandwhich && \
|
|
git checkout 362aa89427df102615a9f92be2f4431498cc1253 && \
|
|
cargo install --path . && \
|
|
cd .. && \
|
|
rm -rf bandwhich
|
|
|
|
# Install btm main as of 2025-03-29
|
|
RUN git clone https://github.com/ClementTsang/bottom.git && \
|
|
cd bottom && \
|
|
git checkout f8b8a21748d7b7a9298168328fad7b28cab65a12 && \
|
|
cargo install --path . && \
|
|
cd .. && \
|
|
rm -rf bottom
|
|
|
|
# Install Python support for Neovim
|
|
RUN pip3 install --break-system-packages pynvim
|
|
|
|
# ----------------------------
|
|
# 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
|
|
|
|
# ----------------------------
|
|
# 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"]
|