File size: 817 Bytes
89b435a d66b32d 89b435a d76b487 89b435a d66b32d 89b435a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
ENV PORT=7860
ENV PASSWORD=123
# Dependencias básicas
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
sudo \
ca-certificates \
gnupg \
&& rm -rf /var/lib/apt/lists/*
# Instalar Node.js (requerido por code-server extensiones)
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
# Instalar code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Crear usuario no root (recomendado en Hugging Face Spaces)
RUN useradd -m vscode && echo "vscode ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER vscode
WORKDIR /home/vscode
# Exponer puerto de HF Spaces
EXPOSE 7860
# Lanzar code-server
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "password"] |