Files
devcontainers/vibe-dev/Dockerfile.fedora
enoch 518eb5a90e Add Oh My Pi and improve dev container config
- Install @oh-my-pi/pi-coding-agent and move Go binaries to /usr/local/bin
- Add omp-data volume and make web port configurable via PORT_WEB
- Replace aider self-check with omp in Makefile
- Harden entrypoint: avoid exporting API keys to SSH env and overwrite
  mounted public key into authorized_keys
- Add .dockerignore, simplify .env.example, and document omp in README
2026-06-22 21:51:56 +08:00

51 lines
1.7 KiB
Docker

FROM fedora:latest
# 1. 系统工具与编译环境
RUN dnf update -y && dnf install -y \
curl git wget unzip procps-ng shellcheck \
gcc gcc-c++ make cmake openssl-devel jq tmux vim \
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" \
GOPATH="/root/go"
ENV PATH="$BUN_INSTALL/bin:/usr/local/cargo/bin:/usr/local/go/bin:$GOPATH/bin:${PATH}"
RUN chsh -s /bin/zsh root
# 3. 安装 Rust & Bun & Go
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN curl -fsSL https://bun.sh/install | bash
RUN curl -fsSL https://go.dev/dl/go1.24.4.linux-amd64.tar.gz | tar -C /usr/local -xzf - \
&& go install golang.org/x/tools/gopls@latest \
&& go install github.com/go-delve/delve/cmd/dlv@latest \
&& mv /root/go/bin/* /usr/local/bin/
# 4. 全局安装 AI 工具 (Vibe Coding 核心: opencode + oh-my-pi)
RUN bun install -g opencode-ai @oh-my-pi/pi-coding-agent
# 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
RUN sed -i 's/#PermitUserEnvironment no/PermitUserEnvironment yes/' /etc/ssh/sshd_config
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"]