| # Use the official linuxserver code-server image | |
| FROM linuxserver/code-server:latest | |
| # Set working directory | |
| WORKDIR /config # linuxserver uses /config for settings and projects | |
| # Expose HF Spaces port | |
| EXPOSE 7860 | |
| # Environment variables | |
| ENV PUID=1000 # default user id | |
| ENV PGID=1000 # default group id | |
| ENV TZ=UTC # timezone | |
| ENV PASSWORD="" # empty password for no-auth (HF Spaces) | |
| # Start code-server binding to HF Spaces port | |
| CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "/config"] |