# VS Code in browser
FROM lscr.io/linuxserver/code-server:latest

USER root

# Install additional tools
RUN apt-get update && apt-get install -y \
    git \
    neovim \
    ranger \
    tmux \
    htop \
    tree \
    jq \
    && rm -rf /var/lib/apt/lists/*

# Install Node.js
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
    && apt-get install -y nodejs \
    && rm -rf /var/lib/apt/lists/*

# Set up git
RUN git config --global init.defaultBranch main

# Code-server runs as abc user by default
USER abc

EXPOSE 8443