86 lines
2.4 KiB
Docker
86 lines
2.4 KiB
Docker
# CmdForge - Test Installation Container
|
|
#
|
|
# This container simulates a fresh computer for testing the installation process.
|
|
# CmdForge source is available but NOT installed - you run the installer yourself.
|
|
#
|
|
# Build:
|
|
# docker build -f Dockerfile.test-install -t cmdforge-test-install .
|
|
#
|
|
# Run:
|
|
# docker run -it --rm cmdforge-test-install
|
|
#
|
|
# Inside the container:
|
|
# ./install.sh # Run the installer
|
|
# cmdforge ui # Launch the UI
|
|
# cmdforge providers install # Set up an AI provider
|
|
|
|
FROM ubuntu:22.04
|
|
|
|
LABEL maintainer="rob"
|
|
LABEL description="CmdForge installation test environment"
|
|
|
|
# Prevent interactive prompts during package installation
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Install system dependencies (what a typical dev machine would have)
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
# Python
|
|
python3 \
|
|
python3-pip \
|
|
python3-venv \
|
|
# Common tools a developer would have
|
|
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 (simulates typical user setup)
|
|
RUN useradd -m -s /bin/bash testuser
|
|
USER testuser
|
|
WORKDIR /home/testuser
|
|
|
|
# Copy CmdForge source (owned by testuser)
|
|
COPY --chown=testuser:testuser . /home/testuser/CmdForge
|
|
|
|
# Set up PATH for local bin (where cmdforge wrappers go)
|
|
RUN mkdir -p /home/testuser/.local/bin
|
|
ENV PATH="/home/testuser/.local/bin:${PATH}"
|
|
|
|
# Make install script executable
|
|
RUN chmod +x /home/testuser/CmdForge/install.sh
|
|
|
|
# Welcome message
|
|
RUN echo '\n\
|
|
echo ""\n\
|
|
echo "================================================================="\n\
|
|
echo " CmdForge Installation Test Environment"\n\
|
|
echo "================================================================="\n\
|
|
echo ""\n\
|
|
echo " CmdForge source is in: ~/CmdForge"\n\
|
|
echo " To install, run:"\n\
|
|
echo ""\n\
|
|
echo " cd ~/CmdForge"\n\
|
|
echo " ./install.sh"\n\
|
|
echo ""\n\
|
|
echo " After installation:"\n\
|
|
echo " cmdforge ui # Launch the UI"\n\
|
|
echo " cmdforge list # List tools"\n\
|
|
echo " cmdforge providers install # Set up AI provider"\n\
|
|
echo ""\n\
|
|
echo "================================================================="\n\
|
|
echo ""\n\
|
|
' >> /home/testuser/.bashrc
|
|
|
|
WORKDIR /home/testuser/CmdForge
|
|
|
|
# Start in interactive bash
|
|
CMD ["/bin/bash"]
|