2026-02-21 13:17:51 +01:00
|
|
|
FROM debian:bookworm-slim
|
|
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
2026-02-21 16:42:44 +01:00
|
|
|
clang clangd llvm-dev libclang-dev pkg-config build-essential git make curl nodejs npm \
|
2026-02-21 16:34:17 +01:00
|
|
|
pylint black flake8 mypy isort logrotate sudo cmake libicu-dev zlib1g-dev \
|
|
|
|
|
libcurl4-openssl-dev libssl-dev ruby-dev jq python3 python3-pip golang-go rustc cargo \
|
|
|
|
|
r-base sqlite3 wget bash zsh libgit2-dev \
|
2026-02-21 13:17:51 +01:00
|
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
2026-02-21 16:34:17 +01:00
|
|
|
RUN echo "deb http://deb.debian.org/debian testing main" > /etc/apt/sources.list.d/testing.list
|
2026-02-21 13:17:51 +01:00
|
|
|
|
2026-02-21 16:34:17 +01:00
|
|
|
COPY tools/install_latest_go.sh /tmp/install_latest_go.sh
|
|
|
|
|
RUN bash /tmp/install_latest_go.sh && \
|
|
|
|
|
echo "PATH=/usr/local/go/bin:$PATH" >> /root/.bashrc
|
|
|
|
|
ENV PATH=/usr/local/go/bin:$PATH
|
|
|
|
|
|
|
|
|
|
ENV RUSTUP_HOME=/usr/local/rustup
|
|
|
|
|
ENV CARGO_HOME=/usr/local/cargo
|
|
|
|
|
ENV PATH=/usr/local/cargo/bin:$PATH
|
|
|
|
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable && \
|
|
|
|
|
rustup install nightly && \
|
|
|
|
|
rustup component add rustfmt clippy rust-src rust-docs && \
|
|
|
|
|
cargo install cargo-edit cargo-watch cargo-outdated cargo-make cargo-binstall
|
|
|
|
|
|
2026-02-21 16:42:44 +01:00
|
|
|
RUN npm install -g typescript tsc @types/node eslint prettier pyright typescript-language-server
|
2026-02-21 16:34:17 +01:00
|
|
|
|
|
|
|
|
RUN cargo binstall --strategies crate-meta-data jj-cli
|
|
|
|
|
|
|
|
|
|
RUN cargo install --git https://github.com/nilskch/jj-lsp.git
|
|
|
|
|
|
|
|
|
|
RUN gem install github-linguist
|
|
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir --break-system-packages ruff fastmcp ipython
|
|
|
|
|
|
|
|
|
|
RUN curl -fsSL https://opencode.ai/install | bash && \
|
|
|
|
|
mkdir -p /root/.config/opencode && \
|
|
|
|
|
mv /root/.opencode/bin/opencode /usr/local/bin/
|
2026-02-21 13:17:51 +01:00
|
|
|
|
2026-02-21 16:42:44 +01:00
|
|
|
ENV GOPATH=/usr/local/go
|
|
|
|
|
ENV GOBIN=/usr/local/go/bin
|
2026-02-21 21:04:13 +01:00
|
|
|
RUN go install golang.org/x/tools/gopls@latest \
|
|
|
|
|
&& go install github.com/isaacphi/mcp-language-server@latest \
|
|
|
|
|
&& go install github.com/dorcha-inc/orla/cmd/orla@latest
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p /etc/bash_completion.d \
|
|
|
|
|
&& orla completion bash > /etc/bash_completion.d/orla \
|
|
|
|
|
&& jj util completion bash > /etc/bash_completion.d/jj
|
|
|
|
|
|
|
|
|
|
RUN rustup component add rust-analyzer --toolchain nightly
|
2026-02-21 13:17:51 +01:00
|
|
|
|
|
|
|
|
ARG USERNAME=devuser
|
|
|
|
|
ARG USER_UID=1000
|
|
|
|
|
ARG USER_GID=1000
|
2026-02-21 16:34:17 +01:00
|
|
|
RUN groupadd --gid $USER_GID $USERNAME && \
|
2026-02-21 16:42:44 +01:00
|
|
|
useradd --uid $USER_UID \
|
2026-02-21 21:04:13 +01:00
|
|
|
--gid $USER_GID \
|
|
|
|
|
-m $USERNAME \
|
|
|
|
|
--shell /bin/bash && \
|
|
|
|
|
echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/$USERNAME && \
|
|
|
|
|
chmod 440 /etc/sudoers.d/$USERNAME
|
2026-02-21 13:17:51 +01:00
|
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
|
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
2026-02-21 21:04:13 +01:00
|
|
|
RUN mkdir -p /home/${USERNAME}/.config \
|
|
|
|
|
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.config
|
|
|
|
|
COPY --chown=${USERNAME}:${USERNAME} opencode /home/${USERNAME}/.config/opencode
|
2026-02-21 13:17:51 +01:00
|
|
|
|
|
|
|
|
USER $USERNAME
|
|
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
2026-02-21 21:04:13 +01:00
|
|
|
|
2026-02-21 13:17:51 +01:00
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
|
|
|
CMD ["/bin/bash"]
|