# ============================================================================= # FOXHUNT TLI CLIENT - DEVELOPMENT CONTAINER # ============================================================================= # This Dockerfile creates a development-friendly TLI container with debugging # capabilities and development tools # ============================================================================= # BUILDER STAGE - Development Build # ============================================================================= FROM rust:1.75-slim as tli-dev-builder # Install build dependencies RUN apt-get update && apt-get install -y \ build-essential \ pkg-config \ libssl-dev \ ca-certificates \ protobuf-compiler \ git \ && rm -rf /var/lib/apt/lists/* # Development Cargo configuration ENV CARGO_NET_GIT_FETCH_WITH_CLI=true ENV CARGO_INCREMENTAL=1 ENV CARGO_PROFILE_DEV_DEBUG=true WORKDIR /workspace # Copy workspace files COPY Cargo.toml Cargo.lock ./ COPY trading_engine ./trading_engine COPY common ./common COPY tli ./tli # Build in development mode with debug symbols RUN cargo build \ --package tli # ============================================================================= # DEVELOPMENT RUNTIME - Ubuntu with Development Tools # ============================================================================= FROM ubuntu:22.04 # Install runtime dependencies and development tools RUN apt-get update && apt-get install -y \ ca-certificates \ libssl3 \ curl \ wget \ netcat-openbsd \ # Terminal and development tools bash \ zsh \ fish \ tmux \ screen \ vim \ nano \ htop \ tree \ jq \ # Terminal libraries libncurses6 \ libncursesw6 \ ncurses-term \ # Development utilities git \ build-essential \ gdb \ strace \ && rm -rf /var/lib/apt/lists/* # Install modern terminal tools RUN curl -fsSL https://starship.rs/install.sh | bash -s -- --yes # Create app user with shell access RUN groupadd -r foxhunt && useradd -r -g foxhunt -s /bin/bash -m foxhunt # Create directories RUN mkdir -p /app/config /app/logs /home/foxhunt/.config \ && chown -R foxhunt:foxhunt /app /home/foxhunt # Copy debug binary from builder COPY --from=tli-dev-builder /workspace/target/debug/tli /app/tli RUN chmod +x /app/tli # Copy configuration templates COPY tli/config/ /app/config/ || true # Setup shell environment for foxhunt user USER foxhunt WORKDIR /app # Setup shell configuration RUN echo 'eval "$(starship init bash)"' >> /home/foxhunt/.bashrc RUN echo 'alias ll="ls -la"' >> /home/foxhunt/.bashrc RUN echo 'alias tli="/app/tli"' >> /home/foxhunt/.bashrc # Terminal environment ENV TERM=xterm-256color ENV COLORTERM=truecolor ENV SHELL=/bin/bash # Development environment variables ENV RUST_LOG=debug ENV RUST_BACKTRACE=full ENV FOXHUNT_CONFIG=/app/config/development.toml ENV FOXHUNT_ENV=development # TLI development mode - interactive shell with tools CMD ["/bin/bash", "-l"]