summaryrefslogtreecommitdiff
path: root/images/agent-base/Dockerfile
blob: 0e8057c63cfc3ca306afa2b306c1d593003f04bf (plain)
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
47
48
49
50
51
52
53
54
55
56
57
58
# Claudomator Agent Base Image
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

# Base system tools
RUN apt-get update && apt-get install -y \
    git \
    curl \
    make \
    wget \
    sqlite3 \
    jq \
    sudo \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Node.js 22 via NodeSource
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
    && apt-get install -y nodejs \
    && rm -rf /var/lib/apt/lists/*

# Go 1.24
RUN wget -q https://go.dev/dl/go1.24.1.linux-amd64.tar.gz && \
    tar -C /usr/local -xzf go1.24.1.linux-amd64.tar.gz && \
    rm go1.24.1.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin

# Claude Code CLI
RUN npm install -g @anthropic-ai/claude-code

# Gemini CLI
RUN npm install -g @google/gemini-cli

# CSS build tools (for claudomator itself)
RUN npm install -g postcss-cli tailwindcss autoprefixer

# Git: allow operations on any directory (agents clone into /workspace/*)
RUN git config --system safe.directory '*'

# Claudomator agent CLI tools (ct)
COPY tools/ct /usr/local/bin/ct
RUN chmod +x /usr/local/bin/ct

# Setup workspace
WORKDIR /workspace

# Agent user with passwordless sudo
RUN useradd -m claudomator-agent && \
    echo "claudomator-agent ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

USER claudomator-agent

# Create a default empty config to satisfy the CLI if no mount is provided
RUN mkdir -p /home/claudomator-agent/.claude && \
    echo '{}' > /home/claudomator-agent/.claude.json

CMD ["/bin/bash"]