Add pre-installed Docker container
Dockerfile.ready provides CmdForge pre-installed and ready to use, for regular usage after testing the installer with Dockerfile.test-install. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
a70267cf53
commit
4d09c3f912
|
|
@ -0,0 +1,98 @@
|
|||
# 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 \
|
||||
# For providers that need browser auth
|
||||
firefox \
|
||||
xdg-utils \
|
||||
# X11 for display forwarding
|
||||
libx11-6 \
|
||||
libxext6 \
|
||||
libxrender1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# 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
|
||||
|
||||
# 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"]
|
||||
Loading…
Reference in New Issue