From a090d487e5245729f9c9a9f0418ff7b4c519e08c Mon Sep 17 00:00:00 2001 From: Toby Scott Date: Thu, 30 Oct 2025 20:09:20 +1100 Subject: [PATCH 1/8] Delete old config --- .config/ranger/rc.conf | 5 ----- .ohmyzsh/custom/aliases.zsh | 3 --- .zshrc | 13 ------------- 3 files changed, 21 deletions(-) delete mode 100644 .config/ranger/rc.conf delete mode 100644 .ohmyzsh/custom/aliases.zsh delete mode 100644 .zshrc diff --git a/.config/ranger/rc.conf b/.config/ranger/rc.conf deleted file mode 100644 index 2bf33b3..0000000 --- a/.config/ranger/rc.conf +++ /dev/null @@ -1,5 +0,0 @@ -set show_hidden true -set draw_borders outline -set mouse_enabled true -set preview_images true -set preview_images_method w3m \ No newline at end of file diff --git a/.ohmyzsh/custom/aliases.zsh b/.ohmyzsh/custom/aliases.zsh deleted file mode 100644 index b3df2fd..0000000 --- a/.ohmyzsh/custom/aliases.zsh +++ /dev/null @@ -1,3 +0,0 @@ -alias dive="docker run -ti --rm -v /var/run/docker.sock:/var/run/docker.sock wagoodman/dive" -alias k="kubectl" -alias vim="nvim" \ No newline at end of file diff --git a/.zshrc b/.zshrc deleted file mode 100644 index 4b5ca6a..0000000 --- a/.zshrc +++ /dev/null @@ -1,13 +0,0 @@ -export ZSH="$HOME/.oh-my-zsh" - -ZSH_THEME="robbyrussell" - -plugins=(git zsh-autosuggestions zsh-syntax-highlighting) - -source $ZSH/oh-my-zsh.sh - -export EDITOR='nvim' -export VISUAL='nvim' - -# [ -f /opt/google-cloud-sdk/completion.zsh.inc ] && source /opt/google-cloud-sdk/completion.zsh.inc -[ command -v kubectl &> /dev/null ] && source <(kubectl completion zsh) \ No newline at end of file From 91f13aec5a66cc935dba6cef4dd6b617b0e91604 Mon Sep 17 00:00:00 2001 From: Toby Scott Date: Thu, 30 Oct 2025 20:21:57 +1100 Subject: [PATCH 2/8] Use stow --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 383cc7e..e68b9a3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,10 @@ SHELL ["/bin/bash", "-c"] RUN < Date: Thu, 30 Oct 2025 20:27:58 +1100 Subject: [PATCH 3/8] Migrate to Alpine and use shell script file --- Dockerfile | 63 +++--------------------------------------------------- setup.sh | 48 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 60 deletions(-) create mode 100644 setup.sh diff --git a/Dockerfile b/Dockerfile index e68b9a3..1958f3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,64 +1,7 @@ -FROM debian:12.11-slim +FROM alpine:3.22.2 -SHELL ["/bin/bash", "-c"] - -RUN < Date: Thu, 30 Oct 2025 20:39:00 +1100 Subject: [PATCH 4/8] Update Neovim download link --- setup.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/setup.sh b/setup.sh index 3f24e8a..2ac8810 100644 --- a/setup.sh +++ b/setup.sh @@ -18,6 +18,14 @@ git config --global init.defaultBranch main git clone https://github.com/tbysctt/dotfiles ~/dotfiles cd ~/dotfiles && stow zsh vim lazyvim tmux lf +# Install Neovim +curl -LO "https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz" +tar -xzf nvim-linux-x86_64.tar.gz +mv nvim-linux-x86_64 /opt/nvim +ln -s /opt/nvim/bin/nvim /usr/local/bin/nvim +rm nvim-linux-x86_64.tar.gz +nvim --headless "+Lazy! sync" +qa || true + # Install kubectl KUBECTL_VERSION=$(curl -Ls https://dl.k8s.io/release/stable.txt) curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl" @@ -26,15 +34,6 @@ echo "$(cat kubectl.sha256) kubectl" | sha256sum -c - install -m755 kubectl /usr/local/bin/ rm kubectl kubectl.sha256 -# Install Neovim -NEOVIM_VERSION=$(curl -s https://api.github.com/repos/neovim/neovim/releases/latest | grep -Po '"tag_name": *"v\K[^"]*') -curl -LO "https://github.com/neovim/neovim/releases/download/v${NEOVIM_VERSION}/nvim-linux64.tar.gz" -tar -xzf nvim-linux64.tar.gz -mv nvim-linux64 /opt/nvim -ln -s /opt/nvim/bin/nvim /usr/local/bin/nvim -rm nvim-linux64.tar.gz -nvim --headless "+Lazy! sync" +qa || true - # Install Lazygit LAZYGIT_VERSION=$(curl -s https://api.github.com/repos/jesseduffield/lazygit/releases/latest | grep -Po '"tag_name": *"v\K[^"]*') curl -Lo lazygit.tar.gz "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" From 7712bab03fb0c480cf9d2a2134f665d2e87e61cd Mon Sep 17 00:00:00 2001 From: Toby Scott Date: Thu, 30 Oct 2025 20:44:46 +1100 Subject: [PATCH 5/8] Update GitHub username --- .github/workflows/build.yaml | 4 ++-- README.md | 24 ++++++++++++------------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index bc42215..8ab069e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -32,5 +32,5 @@ jobs: platforms: linux/amd64 push: true tags: | - ghcr.io/tobyscott25/toolbox:latest - ghcr.io/tobyscott25/toolbox:${{ github.sha }} \ No newline at end of file + ghcr.io/tbysctt/toolbox:latest + ghcr.io/tbysctt/toolbox:${{ github.sha }} diff --git a/README.md b/README.md index 0c58afc..20e3ca3 100644 --- a/README.md +++ b/README.md @@ -12,16 +12,16 @@ A comprehensive debugging and development container image packed with essential ```sh # Pull the latest image -docker pull ghcr.io/tobyscott25/toolbox:latest +docker pull ghcr.io/tbysctt/toolbox:latest # Run interactively -docker run --rm -it ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it ghcr.io/tbysctt/toolbox:latest # Run with host network access (useful for network debugging) -docker run --rm -it --network host ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it --network host ghcr.io/tbysctt/toolbox:latest # Mount current directory for file operations -docker run --rm -it -v $(pwd):/workspace -w /workspace ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it -v $(pwd):/workspace -w /workspace ghcr.io/tbysctt/toolbox:latest ``` ## Included Tools @@ -71,14 +71,14 @@ docker run --rm -it -v $(pwd):/workspace -w /workspace ghcr.io/tobyscott25/toolb ### Kubernetes Debugging ```sh # Connect to a cluster and debug -docker run --rm -it -v ~/.kube:/root/.kube ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it -v ~/.kube:/root/.kube ghcr.io/tbysctt/toolbox:latest k get pods # kubectl is aliased to 'k' ``` ### Network Troubleshooting ```sh # Run with host network for network debugging -docker run --rm -it --network host ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it --network host ghcr.io/tbysctt/toolbox:latest ping google.com traceroute 8.8.8.8 tcpdump -i eth0 @@ -87,7 +87,7 @@ tcpdump -i eth0 ### File Analysis & Processing ```sh # Mount directory and analyze files -docker run --rm -it -v /path/to/files:/data ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it -v /path/to/files:/data ghcr.io/tbysctt/toolbox:latest cd /data rg "pattern" . # Search with ripgrep fd "*.json" . | head # Find JSON files @@ -97,7 +97,7 @@ cat file.json | jq '.' # Pretty print JSON ### Development Environment ```sh # Use as a development container -docker run --rm -it -v $(pwd):/workspace -w /workspace ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it -v $(pwd):/workspace -w /workspace ghcr.io/tbysctt/toolbox:latest nvim file.py git status lazygit @@ -108,7 +108,7 @@ lazygit ### With Docker Socket Access ```sh # For Docker-in-Docker scenarios -docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/tobyscott25/toolbox:latest +docker run --rm -it -v /var/run/docker.sock:/var/run/docker.sock ghcr.io/tbysctt/toolbox:latest dive image:tag # Analyze Docker images ``` @@ -118,7 +118,7 @@ dive image:tag # Analyze Docker images docker run --rm -it \ -v ~/.gitconfig:/root/.gitconfig:ro \ -v ~/.kube:/root/.kube:ro \ - ghcr.io/tobyscott25/toolbox:latest + ghcr.io/tbysctt/toolbox:latest ``` ### As a Sidecar Container @@ -129,7 +129,7 @@ kind: Pod spec: containers: - name: debug-toolbox - image: ghcr.io/tobyscott25/toolbox:latest + image: ghcr.io/tbysctt/toolbox:latest command: ["sleep", "infinity"] # Then: kubectl exec -it pod-name -c debug-toolbox -- zsh ``` @@ -139,7 +139,7 @@ spec: To build, run and test locally: ```sh -git clone https://github.com/tobyscott25/toolbox.git +git clone https://github.com/tbysctt/toolbox.git cd toolbox docker build -t tobystoolbox:latest --platform=linux/amd64 . docker run --rm -it tobystoolbox:latest From 6ff24de6c31290b8c4e4332576c38a6475b7e0d5 Mon Sep 17 00:00:00 2001 From: Toby Scott Date: Thu, 30 Oct 2025 20:48:47 +1100 Subject: [PATCH 6/8] Install ohmyzsh without running installation script --- setup.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/setup.sh b/setup.sh index 2ac8810..c41dd56 100644 --- a/setup.sh +++ b/setup.sh @@ -18,6 +18,11 @@ git config --global init.defaultBranch main git clone https://github.com/tbysctt/dotfiles ~/dotfiles cd ~/dotfiles && stow zsh vim lazyvim tmux lf +# Install OhMyZsh and plugins +git clone https://github.com/ohmyzsh/ohmyzsh.git ~/.oh-my-zsh +git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions +git clone https://github.com/zsh-users/zsh-syntax-highlighting ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting + # Install Neovim curl -LO "https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz" tar -xzf nvim-linux-x86_64.tar.gz @@ -41,7 +46,3 @@ tar xf lazygit.tar.gz lazygit install -Dm755 lazygit /usr/local/bin/lazygit rm lazygit.tar.gz lazygit -# Setup ohmyzsh - I'll need to come back to this, I believe it will override the .zshrc I created above -sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended -git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions -git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting From 624282dddde887213df30beb969f42dba54eab50 Mon Sep 17 00:00:00 2001 From: Toby Scott Date: Thu, 30 Oct 2025 21:05:45 +1100 Subject: [PATCH 7/8] Update README --- README.md | 50 +++----------------------------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) diff --git a/README.md b/README.md index 20e3ca3..cc954ff 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,9 @@ A comprehensive debugging and development container image packed with essential tools for troubleshooting, development, and system administration tasks. -- **Base Image**: Debian 12.11 Slim -- **Architecture**: linux/amd64 -- **Shell**: Zsh (with Oh My Zsh) -- **Working Directory**: `/root` -- **Entrypoint**: `zsh` +This image includes [my dotfiles](https://github.com/tbysctt/dotfiles) to configure the built-in tools. + +> Note: It only supports x86 for now. ARM support will come later :) ## Quick Start @@ -24,48 +22,6 @@ docker run --rm -it --network host ghcr.io/tbysctt/toolbox:latest docker run --rm -it -v $(pwd):/workspace -w /workspace ghcr.io/tbysctt/toolbox:latest ``` -## Included Tools - -### Development & Editors -- **nvim** - Neovim (LazyVim distribution) -- **git** - Git VCS -- **lazygit** - Terminal UI for git commands -- **gcc** - GNU C/C++ Compiler -- **python** - Python 3 - -### Kubernetes & Container Tools -- **kubectl** - Kubernetes command-line tool - -### Network & System Debugging -- **curl/wget** - HTTP clients -- **ping** - Network connectivity testing -- **traceroute** - Network path tracing -- **tcpdump** - Network packet analyzer -- **netstat** - Network statistics (via net-tools) -- **dig/nslookup** - DNS lookup tools (via dnsutils) -- **strace** - System call tracer - -### File & Text Processing -- **rg** - Ripgrep, fast text search -- **fzf** - Fuzzy finder -- **fd** - Fast file finder -- **jq** - JSON processor -- **yq** - YAML processor -- **grep/less** - Text processing utilities - -### Shell & Terminal -- **zsh** ZSH (with Oh My Zsh including auto-suggestions and syntax highlighting plugins) -- **tmux** - Terminal multiplexer - -### System Utilities -- **ps/top** - Process utilities (via procps) -- **unzip** - Archive extraction - -## Built-in Aliases - -- `k` → `kubectl` -- `vim` → `nvim` - ## Common Use Cases ### Kubernetes Debugging From f3109bd703a64e9cbd327c33f485c4fec08c99dc Mon Sep 17 00:00:00 2001 From: Toby Scott Date: Thu, 30 Oct 2025 21:10:16 +1100 Subject: [PATCH 8/8] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cc954ff..630b322 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A comprehensive debugging and development container image packed with essential tools for troubleshooting, development, and system administration tasks. -This image includes [my dotfiles](https://github.com/tbysctt/dotfiles) to configure the built-in tools. +This image is based on Alpine to keep the size small and includes [my dotfiles](https://github.com/tbysctt/dotfiles) to configure the built-in tools. > Note: It only supports x86 for now. ARM support will come later :)