FROM imbios/bun-node:22-slim RUN apt-get update \ && apt-get install -y \ python3 python3-pip python3-venv make gcc g++ zsh git curl wget ca-certificates \ sudo gosu locales \ zip unzip tree btop net-tools tmux \ procps psmisc lsof less file man-db \ ripgrep fd-find jq htop sqlite3 \ && sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && locale-gen \ && ln -sf /usr/bin/fdfind /usr/local/bin/fd \ && apt-get clean ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 RUN curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz \ && tar -C /opt -xzf nvim-linux-x86_64.tar.gz \ && rm nvim-linux-x86_64.tar.gz ENV PATH="/opt/nvim-linux-x86_64/bin:${PATH}" RUN git clone --depth 1 https://github.com/LazyVim/starter /opt/lazyvim-starter \ && rm -rf /opt/lazyvim-starter/.git WORKDIR /app COPY pty-sidecar.mjs /app/pty-sidecar.mjs COPY entrypoint.sh /app/entrypoint.sh COPY templates /opt/terminal-templates RUN npm init -y \ && npm install ws@8.18.1 node-pty@1.1.0 RUN curl -fsSL https://starship.rs/install.sh | sh -s -- -y -b /usr/local/bin RUN git clone --depth 1 https://github.com/ohmyzsh/ohmyzsh.git /opt/oh-my-zsh ENV EZA_VERSION=0.18.15 RUN curl -fsSL "https://github.com/eza-community/eza/releases/download/v${EZA_VERSION}/eza_x86_64-unknown-linux-gnu.tar.gz" -o /tmp/eza.tar.gz \ && tar -xzf /tmp/eza.tar.gz -C /tmp \ && mv /tmp/eza /usr/local/bin/eza \ && chmod +x /usr/local/bin/eza \ && rm -rf /tmp/eza.tar.gz /tmp/completions /tmp/man ENV LAZYGIT_VERSION=0.44.1 RUN curl -fsSL "https://github.com/jesseduffield/lazygit/releases/download/v${LAZYGIT_VERSION}/lazygit_${LAZYGIT_VERSION}_Linux_x86_64.tar.gz" -o /tmp/lazygit.tar.gz \ && tar -xzf /tmp/lazygit.tar.gz -C /tmp \ && mv /tmp/lazygit /usr/local/bin/lazygit \ && chmod +x /usr/local/bin/lazygit \ && rm -rf /tmp/lazygit.tar.gz /tmp/LICENSE /tmp/README.md ENV GOLANG_VERSION=1.23.6 RUN curl -fsSL "https://go.dev/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz" -o /tmp/go.tar.gz \ && tar -C /usr/local -xzf /tmp/go.tar.gz \ && rm /tmp/go.tar.gz ENV PATH="/usr/local/go/bin:${PATH}" ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable --profile minimal \ && chmod -R a+rw $CARGO_HOME ENV PATH="/usr/local/cargo/bin:${PATH}" RUN npm install -g @mariozechner/pi-coding-agent @anthropic-ai/claude-code WORKDIR /tmp ENV TERMINAL_PTY_PORT=5337 EXPOSE 5337 ENTRYPOINT ["/app/entrypoint.sh"]