opencode / Dockerfile
kacapower's picture
Upload 3 files
14d4369 verified
Raw
History Blame Contribute Delete
788 Bytes
FROM node:20-bookworm-slim
# System dependencies including Python for the sync script
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
ca-certificates \
curl \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g opencode-ai
# Install HF Hub for data synchronization
RUN pip3 install huggingface_hub --break-system-packages
ENV HOME=/home/node
ENV PATH=/home/node/.local/bin:/usr/local/bin:${PATH}
RUN mkdir -p $HOME/workspace && chown -R node:node $HOME
# Copy the custom logic files into the container
COPY sync.py $HOME/sync.py
COPY start.sh $HOME/start.sh
RUN chown node:node $HOME/sync.py $HOME/start.sh && chmod +x $HOME/start.sh
USER node
WORKDIR $HOME/workspace
EXPOSE 4096
CMD ["/home/node/start.sh"]