File size: 960 Bytes
b294dd1
 
7e951d8
b294dd1
 
7e951d8
b294dd1
 
 
 
 
7e951d8
b294dd1
 
 
 
7e951d8
b294dd1
 
7e951d8
b294dd1
 
 
 
 
 
 
 
 
 
 
 
 
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
# VS Code with Root Access - Simple & Stable
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND=noninteractive
ENV PORT=8000

# Install minimal required packages
RUN apt-get update && \
    apt-get install -y curl wget git vim nano build-essential ca-certificates && \
    curl -fsSL https://code-server.dev/install.sh | sh && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

# Create workspace
RUN mkdir -p /workspace && \
    echo '# VS Code Workspace' > /workspace/README.md && \
    echo 'console.log("Hello World!");' > /workspace/app.js

# Simple aliases
RUN echo 'alias ll="ls -la"' >> /root/.bashrc

WORKDIR /workspace
EXPOSE $PORT

# Simple, direct startup - no complex process management
CMD echo "๐Ÿš€ Starting VS Code as ROOT" && \
    echo "๐Ÿ” Password: $PASSWORD" && \
    echo "๐Ÿ”— Port: $PORT" && \
    code-server \
        --bind-addr "0.0.0.0:$PORT" \
        --auth password \
        --disable-telemetry \
        --log warn \
        /workspace