添加 kilocode 容器支持和通用 Docker 配置

- 添加 kilocode devcontainer 配置
- 新增 Fedora 和 Ubuntu Dockerfile
- 添加构建自动化 (Makefile, compose.yml)
- 配置环境变量管理 (.env, .env.example)
This commit is contained in:
2025-12-25 00:28:15 +08:00
parent aca5f52bc2
commit 635d113b4f
14 changed files with 605 additions and 1 deletions

View File

@@ -0,0 +1,42 @@
FROM fedora:latest
# 1. 系统工具与编译环境
RUN dnf update -y && dnf install -y \
curl git wget unzip procps-ng \
gcc gcc-c++ make cmake openssl-devel \
zsh sudo python3 python3-pip \
openssh-server tar gzip \
&& dnf clean all
# 2. 环境变量配置
ENV CARGO_HOME=/usr/local/cargo \
RUSTUP_HOME=/usr/local/rustup \
BUN_INSTALL="/root/.bun"
ENV PATH="$BUN_INSTALL/bin:/usr/local/cargo/bin:${PATH}"
# 3. 安装 Rust & Bun
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN curl -fsSL https://bun.sh/install | bash
# 4. 全局安装 AI 工具 (Vibe Coding 核心)
RUN bun install -g opencode-ai
# 5. SSH & ZSH 配置
RUN ssh-keygen -A && \
mkdir -p /root/.zed /root/.local/share/zed && \
sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# 6. Shell 美化
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
# 接收来自 compose 的参数
ARG CONTAINER_WORKSPACE=/workspace
# 设置工作目录
WORKDIR ${CONTAINER_WORKSPACE}
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["zsh"]