2026-02-21 13:17:51 +01:00
|
|
|
FROM debian:bookworm-slim
|
|
|
|
|
|
2026-03-11 22:18:02 +01:00
|
|
|
# Base system packages — no golang-go/rustc/cargo from apt (replaced by rustup + install_latest_go.sh)
|
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
|
|
|
clang clangd pkg-config build-essential git make curl \
|
|
|
|
|
nodejs npm \
|
|
|
|
|
python3 python3-pip pylint black flake8 mypy isort \
|
|
|
|
|
logrotate sudo cmake zlib1g-dev \
|
|
|
|
|
libcurl4-openssl-dev libssl-dev \
|
|
|
|
|
ruby-dev libicu-dev \
|
|
|
|
|
jq \
|
|
|
|
|
r-base \
|
|
|
|
|
sqlite3 wget bash zsh \
|
2026-02-21 13:17:51 +01:00
|
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
2026-03-11 22:18:02 +01:00
|
|
|
# Go — latest via script only (no apt golang-go)
|
2026-02-21 16:34:17 +01:00
|
|
|
COPY tools/install_latest_go.sh /tmp/install_latest_go.sh
|
2026-03-11 22:18:02 +01:00
|
|
|
RUN bash /tmp/install_latest_go.sh && rm /tmp/install_latest_go.sh
|
2026-02-21 16:34:17 +01:00
|
|
|
ENV PATH=/usr/local/go/bin:$PATH
|
|
|
|
|
|
2026-03-11 22:18:02 +01:00
|
|
|
# Rust — rustup only (no apt rustc/cargo), stable only, no rust-docs
|
2026-02-21 16:34:17 +01:00
|
|
|
ENV RUSTUP_HOME=/usr/local/rustup
|
|
|
|
|
ENV CARGO_HOME=/usr/local/cargo
|
|
|
|
|
ENV PATH=/usr/local/cargo/bin:$PATH
|
2026-03-11 22:18:02 +01:00
|
|
|
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable --no-modify-path \
|
|
|
|
|
&& rustup component add rustfmt clippy rust-src rust-analyzer \
|
|
|
|
|
&& rustup install nightly --no-self-update \
|
|
|
|
|
&& rustup component add rust-analyzer --toolchain nightly \
|
|
|
|
|
# Install cargo tools via binstall (prebuilt binaries, much faster & smaller)
|
|
|
|
|
&& cargo install cargo-binstall \
|
|
|
|
|
&& cargo binstall --no-confirm \
|
|
|
|
|
cargo-watch cargo-outdated cargo-make \
|
|
|
|
|
jj-cli aichat \
|
|
|
|
|
&& cargo install cargo-edit \
|
|
|
|
|
&& cargo install --git https://github.com/nilskch/jj-lsp.git \
|
|
|
|
|
# Clean build cache (keep installed binaries, drop registry & build artifacts)
|
|
|
|
|
&& rm -rf $CARGO_HOME/registry $CARGO_HOME/git /tmp/cargo-*
|
|
|
|
|
|
|
|
|
|
# Node tools
|
|
|
|
|
RUN npm install -g typescript @types/node eslint prettier pyright typescript-language-server \
|
|
|
|
|
mcp-server-commands \
|
|
|
|
|
&& npm cache clean --force
|
|
|
|
|
|
|
|
|
|
# Ruby tools
|
|
|
|
|
RUN gem install github-linguist \
|
|
|
|
|
&& gem cleanup \
|
|
|
|
|
&& rm -rf /var/cache/gem /root/.gem/specs
|
|
|
|
|
|
|
|
|
|
# Python tools
|
Refactor devcontainer and MCP tools for containerized development
Ajout et configuration d’un environnement de développement conteneurisé (devcontainer) avec support multi-langages (Go, Rust, Python), intégration d’outils LLM locaux/cloud (LM Studio, Claude Pro), et refonte des outils MCP : suppression du module sandbox, correction de la gestion des chemins projet dans jj.py, ajout d’une fonction jj_new_tool, et structuration du Makefile pour le build multiplateforme. Mise à jour des scripts (docker-entrypoint.sh, setup-devcontainer.sh), du README.md et de bin/jj-ai-commit.sh pour automatiser la génération de messages de commit à partir des résumés des fichiers modifiés.
2026-03-11 16:34:09 +01:00
|
|
|
RUN pip install --no-cache-dir --break-system-packages ruff fastmcp ipython tasklin
|
2026-02-21 16:34:17 +01:00
|
|
|
|
2026-03-11 22:18:02 +01:00
|
|
|
# Go tools
|
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 \
|
2026-03-11 22:18:02 +01:00
|
|
|
&& go install github.com/isaacphi/mcp-language-server@latest \
|
|
|
|
|
&& go install github.com/github/github-mcp-server/cmd/github-mcp-server@latest \
|
|
|
|
|
&& go install gitea.com/gitea/gitea-mcp@latest \
|
|
|
|
|
&& go clean -cache -modcache
|
2026-02-21 21:04:13 +01:00
|
|
|
|
2026-03-11 22:18:02 +01:00
|
|
|
# Shell completions
|
2026-02-21 21:04:13 +01:00
|
|
|
RUN mkdir -p /etc/bash_completion.d \
|
2026-03-11 22:18:02 +01:00
|
|
|
&& curl -fsSL https://raw.githubusercontent.com/sigoden/aichat/main/scripts/completions/aichat.bash \
|
Refactor devcontainer and MCP tools for containerized development
Ajout et configuration d’un environnement de développement conteneurisé (devcontainer) avec support multi-langages (Go, Rust, Python), intégration d’outils LLM locaux/cloud (LM Studio, Claude Pro), et refonte des outils MCP : suppression du module sandbox, correction de la gestion des chemins projet dans jj.py, ajout d’une fonction jj_new_tool, et structuration du Makefile pour le build multiplateforme. Mise à jour des scripts (docker-entrypoint.sh, setup-devcontainer.sh), du README.md et de bin/jj-ai-commit.sh pour automatiser la génération de messages de commit à partir des résumés des fichiers modifiés.
2026-03-11 16:34:09 +01:00
|
|
|
> /etc/bash_completion.d/aichat \
|
2026-02-21 21:04:13 +01:00
|
|
|
&& jj util completion bash > /etc/bash_completion.d/jj
|
|
|
|
|
|
2026-03-11 22:18:02 +01:00
|
|
|
# Non-root user
|
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-03-11 22:18:02 +01:00
|
|
|
useradd --uid $USER_UID --gid $USER_GID -m $USERNAME --shell /bin/bash && \
|
2026-02-21 21:04:13 +01:00
|
|
|
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 22:29:33 +00:00
|
|
|
|
|
|
|
|
COPY bin/* /usr/local/bin/
|
|
|
|
|
RUN chmod +x /usr/local/bin/*
|
2026-02-21 21:04:13 +01:00
|
|
|
RUN mkdir -p /home/${USERNAME}/.config \
|
2026-03-11 22:18:02 +01:00
|
|
|
&& mkdir -p /home/${USERNAME}/.cache \
|
|
|
|
|
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.config \
|
|
|
|
|
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.cache
|
2026-02-21 21:04:13 +01:00
|
|
|
COPY --chown=${USERNAME}:${USERNAME} opencode /home/${USERNAME}/.config/opencode
|
2026-02-21 13:17:51 +01:00
|
|
|
|
|
|
|
|
USER $USERNAME
|
|
|
|
|
WORKDIR /workspace
|
|
|
|
|
|
Refactor devcontainer and MCP tools for containerized development
Ajout et configuration d’un environnement de développement conteneurisé (devcontainer) avec support multi-langages (Go, Rust, Python), intégration d’outils LLM locaux/cloud (LM Studio, Claude Pro), et refonte des outils MCP : suppression du module sandbox, correction de la gestion des chemins projet dans jj.py, ajout d’une fonction jj_new_tool, et structuration du Makefile pour le build multiplateforme. Mise à jour des scripts (docker-entrypoint.sh, setup-devcontainer.sh), du README.md et de bin/jj-ai-commit.sh pour automatiser la génération de messages de commit à partir des résumés des fichiers modifiés.
2026-03-11 16:34:09 +01:00
|
|
|
ARG OCI_VERSION=latest
|
|
|
|
|
ARG OCI_CREATED=unknown
|
|
|
|
|
ARG OCI_REVISION=unknown
|
|
|
|
|
|
|
|
|
|
LABEL org.opencontainers.image.title="PMOCrazyCoder" \
|
|
|
|
|
org.opencontainers.image.description="AI-powered dev container with Rust, Go, Python, Node, Jujutsu, Claude Code and opencode" \
|
|
|
|
|
org.opencontainers.image.url="https://niepce.petite-maison-orange.fr/public/pmocrazycoder" \
|
|
|
|
|
org.opencontainers.image.source="https://niepce.petite-maison-orange.fr/public/pmocrazycoder" \
|
|
|
|
|
org.opencontainers.image.version="${OCI_VERSION}" \
|
|
|
|
|
org.opencontainers.image.created="${OCI_CREATED}" \
|
|
|
|
|
org.opencontainers.image.revision="${OCI_REVISION}" \
|
|
|
|
|
org.opencontainers.image.licenses="CECILL-2.1"
|
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"]
|