Spaces:
Paused
Paused
File size: 846 Bytes
54d1d4d 84f79ed 54d1d4d 84f79ed 54d1d4d 84f79ed 54d1d4d 84f79ed 54d1d4d 84f79ed 54d1d4d 84f79ed 54d1d4d 84f79ed 54d1d4d |
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 36 37 |
# Simple approach - just run code-server
FROM python:3.9
# Install code-server
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Install additional tools
RUN apt-get update && apt-get install -y \
git \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /app
# Install Python packages
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy your files
COPY --chown=user . /app
# Create workspace
RUN mkdir -p /home/user/workspace
WORKDIR /home/user/workspace
# Copy your app files to workspace
RUN cp -r /app/* . 2>/dev/null || :
EXPOSE 7860
# Start code-server directly
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none", "--disable-telemetry", "."] |