feat: add tool-images directory with Dockerfiles for all base tool types
- Create tool-images/ directory with organized Dockerfile templates - Add base.dockerfile with common dev tools (git, nvim, ranger, tmux, node) - Add code-server.dockerfile with VS Code in browser - Add jupyter.dockerfile with Jupyter Lab - Add opencode.dockerfile with OpenCode agent - Add pi-agent.dockerfile with Pi Coding Agent (pi.dev) - All images include: git, neovim, ranger, tmux, htop, tree, jq, Node.js 20 - Add README with usage instructions
This commit is contained in:
@@ -0,0 +1,52 @@
|
|||||||
|
# Tool Images
|
||||||
|
|
||||||
|
This directory contains Dockerfile templates for the base tool types used in Headquarter.
|
||||||
|
|
||||||
|
## Available Images
|
||||||
|
|
||||||
|
| File | Tool | Description |
|
||||||
|
|------|------|-------------|
|
||||||
|
| `base.dockerfile` | - | Common base with git, nvim, ranger, tmux, node |
|
||||||
|
| `code-server.dockerfile` | VS Code | Browser-based VS Code with extra tools |
|
||||||
|
| `jupyter.dockerfile` | Jupyter | Jupyter Lab/Notebook with extra tools |
|
||||||
|
| `opencode.dockerfile` | OpenCode | OpenCode agent server |
|
||||||
|
| `pi-agent.dockerfile` | Pi Agent | Pi coding agent with full terminal setup |
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
When creating a tool type in the Tool Workshop, you can reference these Dockerfiles:
|
||||||
|
|
||||||
|
1. Copy the contents of the desired `.dockerfile`
|
||||||
|
2. Paste into the "Dockerfile Template" field
|
||||||
|
3. Set `definition_type` to `dockerfile`
|
||||||
|
|
||||||
|
## Building Locally
|
||||||
|
|
||||||
|
To test an image locally:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd tool-images
|
||||||
|
docker build -f pi-agent.dockerfile -t pi-agent:latest .
|
||||||
|
docker run -it pi-agent:latest
|
||||||
|
```
|
||||||
|
|
||||||
|
## Customizing
|
||||||
|
|
||||||
|
All images include:
|
||||||
|
- **git** - Version control
|
||||||
|
- **neovim** - Terminal editor
|
||||||
|
- **ranger** - Terminal file manager
|
||||||
|
- **tmux** - Terminal multiplexer
|
||||||
|
- **htop** - Process viewer
|
||||||
|
- **tree** - Directory tree
|
||||||
|
- **jq** - JSON processor
|
||||||
|
- **Node.js 20** - For npm-based tools
|
||||||
|
|
||||||
|
The `pi-agent` image additionally includes the [Pi Coding Agent](https://pi.dev/) for AI-assisted development.
|
||||||
|
|
||||||
|
## Adding New Images
|
||||||
|
|
||||||
|
1. Create a new `.dockerfile` in this directory
|
||||||
|
2. Use `base.dockerfile` as a starting point if applicable
|
||||||
|
3. Document it in the table above
|
||||||
|
4. Update the tool type in the database via the Tool Workshop
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
# Base development image with common tools
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
# Prevent interactive prompts during apt install
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install base tools
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
git \
|
||||||
|
neovim \
|
||||||
|
ranger \
|
||||||
|
tmux \
|
||||||
|
htop \
|
||||||
|
tree \
|
||||||
|
jq \
|
||||||
|
ca-certificates \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Create a non-root user
|
||||||
|
RUN useradd -m -s /bin/bash user
|
||||||
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
# Install Node.js (needed for pi and many dev tools)
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get install -y nodejs \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Set up git configuration defaults
|
||||||
|
RUN git config --global init.defaultBranch main \
|
||||||
|
&& git config --global user.email "dev@headquarter.local" \
|
||||||
|
&& git config --global user.name "Developer"
|
||||||
|
|
||||||
|
USER user
|
||||||
|
CMD ["/bin/bash"]
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
# VS Code in browser
|
||||||
|
FROM lscr.io/linuxserver/code-server:latest
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Install additional tools
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
neovim \
|
||||||
|
ranger \
|
||||||
|
tmux \
|
||||||
|
htop \
|
||||||
|
tree \
|
||||||
|
jq \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Node.js
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get install -y nodejs \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Set up git
|
||||||
|
RUN git config --global init.defaultBranch main
|
||||||
|
|
||||||
|
# Code-server runs as abc user by default
|
||||||
|
USER abc
|
||||||
|
|
||||||
|
EXPOSE 8443
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
# Jupyter Notebook/Lab
|
||||||
|
FROM jupyter/scipy-notebook:latest
|
||||||
|
|
||||||
|
USER root
|
||||||
|
|
||||||
|
# Install additional tools
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
git \
|
||||||
|
neovim \
|
||||||
|
ranger \
|
||||||
|
tmux \
|
||||||
|
htop \
|
||||||
|
tree \
|
||||||
|
jq \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Set up git
|
||||||
|
RUN git config --global init.defaultBranch main
|
||||||
|
|
||||||
|
# Switch back to jovyan user (default for scipy-notebook)
|
||||||
|
USER ${NB_UID}
|
||||||
|
|
||||||
|
EXPOSE 8888
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
# OpenCode agent environment
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install base dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
git \
|
||||||
|
neovim \
|
||||||
|
ranger \
|
||||||
|
tmux \
|
||||||
|
htop \
|
||||||
|
tree \
|
||||||
|
jq \
|
||||||
|
ca-certificates \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Node.js
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get install -y nodejs \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install OpenCode
|
||||||
|
RUN npm install -g opencode
|
||||||
|
|
||||||
|
# Create non-root user
|
||||||
|
RUN useradd -m -s /bin/bash user
|
||||||
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
# Set up git
|
||||||
|
RUN git config --global init.defaultBranch main
|
||||||
|
|
||||||
|
USER user
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
CMD ["opencode", "server"]
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
# Pi Coding Agent - Terminal-based coding harness
|
||||||
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
|
|
||||||
|
# Install base dependencies
|
||||||
|
RUN apt-get update && apt-get install -y \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
git \
|
||||||
|
neovim \
|
||||||
|
ranger \
|
||||||
|
tmux \
|
||||||
|
htop \
|
||||||
|
tree \
|
||||||
|
jq \
|
||||||
|
ca-certificates \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
build-essential \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Node.js (required for Pi)
|
||||||
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||||
|
&& apt-get install -y nodejs \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
# Install Pi Coding Agent globally
|
||||||
|
RUN npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
||||||
|
|
||||||
|
# Create non-root user
|
||||||
|
RUN useradd -m -s /bin/bash user
|
||||||
|
WORKDIR /home/user
|
||||||
|
|
||||||
|
# Set up git
|
||||||
|
RUN git config --global init.defaultBranch main \
|
||||||
|
&& git config --global user.email "dev@headquarter.local" \
|
||||||
|
&& git config --global user.name "Developer"
|
||||||
|
|
||||||
|
# Create default tmux config
|
||||||
|
RUN echo 'set -g mouse on\nset -g default-terminal "screen-256color"' > /home/user/.tmux.conf
|
||||||
|
|
||||||
|
# Create default ranger config
|
||||||
|
RUN mkdir -p /home/user/.config/ranger \
|
||||||
|
&& echo 'set preview_files true\nset use_preview_script true' > /home/user/.config/ranger/rc.conf
|
||||||
|
|
||||||
|
# Set up Pi config directory
|
||||||
|
RUN mkdir -p /home/user/.pi/agent
|
||||||
|
|
||||||
|
USER user
|
||||||
|
|
||||||
|
# Default to bash (Pi is invoked manually via `pi` command)
|
||||||
|
CMD ["/bin/bash"]
|
||||||
Reference in New Issue
Block a user