File size: 997 Bytes
7c7446d
 
16d4b0e
7c7446d
16d4b0e
 
7c7446d
 
 
 
 
 
16d4b0e
 
 
 
 
 
7c7446d
16d4b0e
 
 
 
 
 
7c7446d
 
 
 
 
16d4b0e
7c7446d
 
16d4b0e
 
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
35
FROM python:3.11-slim

# Install system dependencies including wget
RUN apt-get update && apt-get install -y \
    wget \
    curl \
    gcc \
    g++ \
    libffi-dev \
    libssl-dev \
    && rm -rf /var/lib/apt/lists/*

# Download and install OpenVSCode Server
RUN wget https://github.com/gitpod-io/openvscode-server/releases/download/openvscode-server-v1.101.2/openvscode-server-v1.101.2-linux-x64.tar.gz -O /tmp/openvscode-server.tar.gz && \
    tar -xzf /tmp/openvscode-server.tar.gz -C /opt && \
    rm /tmp/openvscode-server.tar.gz && \
    mv /opt/openvscode-server-v1.101.2-linux-x64 /opt/openvscode-server && \
    chown -R 1000:1000 /opt/openvscode-server

# Set working directory
WORKDIR /app

# Copy and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy application files
COPY server.py .
COPY cookies.json .

# Expose ports
EXPOSE 7860

# Start command
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]