| |
| FROM node:18-slim |
|
|
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| curl \ |
| bash \ |
| git \ |
| python3 \ |
| python3-pip \ |
| python3.11-venv \ |
| build-essential \ |
| gcc \ |
| g++ \ |
| make \ |
| nano \ |
| zip \ |
| unzip \ |
| procps \ |
| && curl -LsSf https://hf.co/cli/install.sh | bash \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
|
|
| |
| RUN curl -fsSL https://opencode.ai/install | bash |
|
|
|
|
| |
| USER root |
| RUN mkdir -p /data && chmod 777 /data |
| WORKDIR /data |
|
|
|
|
| |
| COPY entrypoint.sh /entrypoint.sh |
| RUN chmod +x /entrypoint.sh |
|
|
|
|
| |
| ENV OPENCODE_DATA_DIR=/data |
| ENV HOME=/data |
| ENV PATH="/root/.local/bin:/home/node/.local/bin:$PATH" |
| ENV NODE_OPTIONS="--max-old-space-size=14336" |
|
|
|
|
| |
| EXPOSE 7860 |
|
|
|
|
| |
| CMD ["/entrypoint.sh"] |