Vscode_server / Dockerfile
Rapidfireop's picture
Create Dockerfile
b30e626 verified
FROM debian:11-slim
# Install code-server and required tools
RUN apt-get update && apt-get install -y \
curl \
sudo \
git \
procps \
&& curl -fsSL https://code-server.dev/install.sh | sh
# Hugging Face requires a user with ID 1000
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
# Expose the specific port Hugging Face expects
EXPOSE 7860
# Start code-server without a password for now (we'll use Space secrets later)
# Binding to port 7860 is mandatory
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]