FROM python:3.13-trixie ENV APP_DIR="/app" # Set environment variables ENV PYTHONPATH=${APP_DIR}/src ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ENV PIP_NO_CACHE_DIR=1 ENV UV_CACHE_DIR=/tmp/uv-cache # MCP server environment variables ENV PATH=$PATH:/usr/local/go/bin:~/.local/bin ENV NODE_PATH=/usr/local/lib/node_modules WORKDIR $APP_DIR # sudo is not available at this point RUN apt-get update && \ apt-get upgrade -y --no-install-recommends && \ apt-get dist-upgrade -y --no-install-recommends && \ apt-get install -y --no-install-recommends \ # Essential build tools sudo \ build-essential \ libportaudio2 \ iproute2 \ gcc \ g++ \ make \ # Development utilities curl \ wget \ git \ vim \ nano \ jq \ gawk \ pandoc \ tree \ htop \ unzip \ ca-certificates \ # Shell enhancements zsh \ # Networking tools net-tools \ iputils-ping \ # Process management procps \ # For MCP servers gnupg \ lsb-release && \ # install node24 apt-get install -y curl && \ curl -fsSL https://deb.nodesource.com/setup_24.x | bash - && \ apt-get install -y nodejs && \ # Cleanup after installs/updates apt-get clean && \ rm -r /var/lib/apt/lists/* # set up devuser (non-root) ARG USERNAME=devuser ARG USER_UID=1000 ARG USER_GID=$USER_UID RUN groupadd --gid $USER_GID $USERNAME \ && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME USER $USERNAME ENV PATH="${PATH}:/usr/local/bin/:/home/${USERNAME}/.local/bin/" # install go for gitea mcp RUN curl -fsSL https://go.dev/dl/go1.26.5.linux-amd64.tar.gz | sudo tar -xzC /usr/local \ && sudo ln -s /usr/local/go/bin/go /usr/local/bin/go \ && sudo ln -s /usr/local/go/bin/gofmt /usr/local/bin/gofmt # install nox RUN pip install --no-cache-dir \ "nox>=2025.4.22" # Install Oh My Zsh for better shell experience RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended # Set default shell to zsh ENV SHELL=/bin/zsh # install opencode RUN sudo npm install -g opencode-ai CMD ["/bin/zsh"]