Code-Server_IDE / Dockerfile
NitinBot002's picture
Update Dockerfile
5a9a1d5 verified
raw
history blame
912 Bytes
# Dockerfile
FROM python:3.9-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
curl \
wget \
git \
build-essential \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Install code-server
# RUN curl -fsSL https://code-server.dev/install.sh | sh
RUN apt-get install code-server
# Verify code-server installation
RUN code-server --version
# Set working directory
WORKDIR /app
# Copy requirements and install Python packages
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Create workspace directory and set permissions
RUN mkdir -p /tmp/workspace && \
mkdir -p /root/.config/code-server && \
chmod -R 755 /tmp/workspace
# Expose ports
EXPOSE 7860 8080
# Set environment variables
ENV PORT=7860
ENV CODE_SERVER_PASSWORD=huggingface123
# Run the application
CMD ["python", "app.py"]