141 lines
3.7 KiB
Docker
141 lines
3.7 KiB
Docker
# CmdForge - Ready-to-Use Container
|
|
#
|
|
# CmdForge is pre-installed and ready to use immediately.
|
|
# Use this for regular usage after testing the installer.
|
|
#
|
|
# Build:
|
|
# docker build -f Dockerfile.ready -t cmdforge-ready .
|
|
#
|
|
# Run:
|
|
# docker run -it --rm cmdforge-ready
|
|
#
|
|
# With persistent storage (keeps your tools and settings):
|
|
# docker run -it --rm -v cmdforge-data:/home/user/.cmdforge cmdforge-ready
|
|
#
|
|
# Inside the container:
|
|
# cmdforge ui # Launch the TUI
|
|
# cmdforge list # List installed tools
|
|
# cmdforge run <tool> # Run a tool
|
|
|
|
FROM ubuntu:22.04
|
|
|
|
LABEL maintainer="rob"
|
|
LABEL description="CmdForge pre-installed and ready to use"
|
|
|
|
# Prevent interactive prompts during package installation
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install system dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
# Python
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
# Common tools
|
|
git \
|
|
curl \
|
|
vim \
|
|
less \
|
|
# Node.js for opencode
|
|
nodejs \
|
|
npm \
|
|
# For providers that need browser auth
|
|
firefox \
|
|
xdg-utils \
|
|
# Qt/PySide6 dependencies (complete set)
|
|
libgl1 \
|
|
libegl1 \
|
|
libglib2.0-0 \
|
|
libfontconfig1 \
|
|
libfreetype6 \
|
|
libx11-6 \
|
|
libx11-xcb1 \
|
|
libxext6 \
|
|
libxrender1 \
|
|
libxcb1 \
|
|
libxcb-cursor0 \
|
|
libxcb-glx0 \
|
|
libxcb-icccm4 \
|
|
libxcb-image0 \
|
|
libxcb-keysyms1 \
|
|
libxcb-randr0 \
|
|
libxcb-render0 \
|
|
libxcb-render-util0 \
|
|
libxcb-shape0 \
|
|
libxcb-shm0 \
|
|
libxcb-sync1 \
|
|
libxcb-xfixes0 \
|
|
libxcb-xinerama0 \
|
|
libxcb-xkb1 \
|
|
libxkbcommon0 \
|
|
libxkbcommon-x11-0 \
|
|
libxkbfile1 \
|
|
libdbus-1-3 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxi6 \
|
|
libxrandr2 \
|
|
libxtst6 \
|
|
libnss3 \
|
|
libasound2 \
|
|
libpulse0 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install opencode (free AI coding assistant)
|
|
RUN npm install -g opencode-ai@latest
|
|
|
|
# Create a non-root user
|
|
RUN useradd -m -s /bin/bash user
|
|
USER user
|
|
WORKDIR /home/user
|
|
|
|
# Copy CmdForge source
|
|
COPY --chown=user:user . /home/user/CmdForge
|
|
|
|
# Set up PATH
|
|
RUN mkdir -p /home/user/.local/bin
|
|
ENV PATH="/home/user/.cmdforge-venv/bin:/home/user/.local/bin:${PATH}"
|
|
|
|
# Install CmdForge in a virtual environment
|
|
RUN python3 -m venv /home/user/.cmdforge-venv && \
|
|
/home/user/.cmdforge-venv/bin/pip install --upgrade pip && \
|
|
/home/user/.cmdforge-venv/bin/pip install -e "/home/user/CmdForge[all]"
|
|
|
|
# Install example tools
|
|
RUN /home/user/.cmdforge-venv/bin/python /home/user/CmdForge/examples/install.py
|
|
|
|
# Generate CLI wrappers
|
|
RUN /home/user/.cmdforge-venv/bin/cmdforge refresh
|
|
|
|
# Configure opencode as a provider (installed globally via npm)
|
|
RUN /home/user/.cmdforge-venv/bin/cmdforge providers add opencode "/usr/local/bin/opencode run" --description "OpenCode AI coding assistant"
|
|
|
|
# Welcome message
|
|
RUN echo '\n\
|
|
echo ""\n\
|
|
echo "================================================================="\n\
|
|
echo " CmdForge - Ready to Use"\n\
|
|
echo "================================================================="\n\
|
|
echo ""\n\
|
|
echo " Commands:"\n\
|
|
echo " cmdforge ui # Launch the graphical UI"\n\
|
|
echo " cmdforge list # List installed tools"\n\
|
|
echo " cmdforge run <tool> # Run a tool"\n\
|
|
echo " cmdforge create <name> # Create a new tool"\n\
|
|
echo ""\n\
|
|
echo " Registry:"\n\
|
|
echo " cmdforge registry search <query> # Search for tools"\n\
|
|
echo " cmdforge registry install <tool> # Install from registry"\n\
|
|
echo ""\n\
|
|
echo " Provider setup:"\n\
|
|
echo " cmdforge providers install # Set up AI provider"\n\
|
|
echo ""\n\
|
|
echo "================================================================="\n\
|
|
echo ""\n\
|
|
' >> /home/user/.bashrc
|
|
|
|
WORKDIR /home/user
|
|
|
|
# Start in interactive bash
|
|
CMD ["/bin/bash"]
|