image_ai / Dockerfile
shashwatIDR's picture
Update Dockerfile
24c7dbc verified
raw
history blame
789 Bytes
FROM codercom/code-server:latest
# Switch to root user temporarily for installations
USER root
# Install Python and Node.js
RUN apt-get update && \
apt-get install -y python3 python3-pip curl && \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Create the working directory and set proper ownership
RUN mkdir -p /animesh && \
chown -R coder:coder /animesh
# Switch back to the coder user (this is important for fixuid to work properly)
USER coder
# Set the working directory
WORKDIR /animesh
# Expose port for Hugging Face Spaces
EXPOSE 7860
# Run code-server with proper configuration
CMD ["code-server", "--auth=none", "--bind-addr", "0.0.0.0:7860", "/animesh"]