| # ---- latest code-server (ships VS Code 1.96) ---- | |
| FROM codercom/code-server:4.93.1 | |
| USER root | |
| # optional: gcc/make/python for C/C++/Node builds | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential gcc g++ make python3 python3-pip \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # password is read from HF secret PASSWORD at run-time | |
| ENV PASSWORD=${PASSWORD} | |
| USER coder | |
| WORKDIR /workspace | |
| # HF Spaces forwards :8080 automatically | |
| EXPOSE 8080 | |
| CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "password", "/workspace"] |