51 lines
No EOL
1.8 KiB
Docker
51 lines
No EOL
1.8 KiB
Docker
FROM node:22-trixie-slim
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
curl \
|
|
git \
|
|
openssh-client \
|
|
autossh \
|
|
python3 \
|
|
make \
|
|
g++ \
|
|
chromium \
|
|
gnupg \
|
|
docker.io \
|
|
ffmpeg \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/local/bin sh
|
|
|
|
RUN mkdir -p -m 0755 /etc/apt/keyrings \
|
|
&& curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | gpg --dearmor -o /etc/apt/keyrings/githubcli-archive-keyring.gpg \
|
|
&& chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg \
|
|
&& mkdir -p /etc/apt/sources.list.d \
|
|
&& echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
|
|
&& apt-get update \
|
|
&& apt-get install -y gh \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -o /usr/local/bin/cloudflared && chmod +x /usr/local/bin/cloudflared
|
|
|
|
RUN git config --system credential.helper '!gh auth git-credential' && \
|
|
git config --system user.name "opencode-agent" && \
|
|
git config --system user.email "agent@opencode.local"
|
|
|
|
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
|
|
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
|
|
|
|
RUN npm install -g opencode-ai repomix @vscode/ripgrep --unsafe-perm
|
|
ENV NODE_PATH=/usr/local/lib/node_modules
|
|
|
|
COPY pyproject.toml uv.lock README.md /opt/memory/
|
|
COPY src/ /opt/memory/src/
|
|
RUN cd /opt/memory && uv sync --no-dev --frozen
|
|
ENV PYTHONPATH=/opt/memory/src
|
|
ENV PATH=/opt/memory/.venv/bin:$PATH
|
|
|
|
WORKDIR /root/workspace
|
|
|
|
EXPOSE 4096
|
|
|
|
ENTRYPOINT ["opencode"] |