# Vibn IDE — Custom Theia workspace image
FROM ghcr.io/eclipse-theia/theia-blueprint/theia-ide:latest

USER root

RUN apt-get update && apt-get install -y --no-install-recommends git && \
    rm -rf /var/lib/apt/lists/*

COPY startup.sh /startup.sh
COPY sync-server.js /sync-server.js
RUN chmod +x /startup.sh && \
    chown theia:theia /startup.sh /sync-server.js

RUN mkdir -p /home/project && chown -R theia:theia /home/project

USER theia

EXPOSE 3000 3001

ENTRYPOINT ["/startup.sh"]
