File size: 568 Bytes
0cc0034 644cafe 0cc0034 644cafe 0cc0034 c1f1949 | 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 | # Use the official Python image as the base
FROM python:3.9-slim
# Install dependencies for code-server
RUN apt-get update && apt-get install -y \
curl \
git \
&& curl -fsSL https://code-server.dev/install.sh | sh
# Create a non-root user
RUN useradd -m coder && \
mkdir -p /home/coder/.config && \
chown -R coder:coder /home/coder
# Set working directory
WORKDIR /app
# Switch to non-root user
USER coder
# Expose port 8080 for code-server
EXPOSE 8080
# Start code-server
CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]
|