File size: 817 Bytes
8d001f3
922248b
6252a49
 
 
8d001f3
922248b
 
8d001f3
 
922248b
 
8d001f3
 
922248b
6252a49
8d001f3
6252a49
 
 
 
 
8d001f3
 
 
922248b
8d001f3
922248b
8d001f3
 
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
FROM ubuntu:22.04

# Interactive prompts ko disable karne ke liye
ENV DEBIAN_FRONTEND=noninteractive

# Zaroori tools aur code-server (VS Code) install karne ke liye
RUN apt-get update && apt-get install -y \
    curl \
    git \
    sudo \
    && rm -rf /var/lib/apt/lists/*

# Code-server install karna
RUN curl -fsSL https://code-server.dev/install.sh | sh

# Hugging Face ke liye user setup
RUN useradd -m -u 1000 user

# === UPDATE: Is line se 'user' ko bina password ke sudo access mil jayega ===
RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers

# User aur environment permissions setup karna
USER user
ENV HOME=/home/user \
    PATH=/home/user/.local/bin:$PATH

WORKDIR $HOME/app

# VS Code ko port 7860 par run karne ki command
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "."]