Opencode / Dockerfile
kovinape's picture
Update Dockerfile
2787a02 verified
raw
history blame contribute delete
501 Bytes
FROM node:20-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates git curl tini \
&& rm -rf /var/lib/apt/lists/*
RUN npm install -g opencode-ai
# Create an app dir and give ownership to the existing "node" user (uid 1000)
RUN mkdir -p /home/node/app && chown -R node:node /home/node/app
USER node
WORKDIR /home/node/app
COPY --chown=node:node . .
EXPOSE 7860
ENTRYPOINT ["/usr/bin/tini","--"]
CMD ["opencode","web","--hostname","0.0.0.0","--port","7860"]