Spaces:
Paused

learning / Dockerfile
hendersonlow123's picture
Update Dockerfile
2b9e3df verified
Raw History Blame Contribute Delete
908 Bytes
# Use a base image, e.g., a recent Ubuntu or Debian image
FROM ubuntu:22.04
# Install necessary packages
RUN apt-get update && apt-get install -y \
wget \
dpkg \
curl \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Download and install code-server
RUN wget https://github.com/coder/code-server/releases/download/v4.8.3/code-server_4.8.3_amd64.deb && \
dpkg -i code-server_4.8.3_amd64.deb && \
rm -f code-server_4.8.3_amd64.deb
# (Optional) Install Python packages or other dependencies for your development environment
# RUN pip3 install toml
# Set the user for code-server
USER coder
# Expose the default port for code-server
EXPOSE 8080
# Start code-server when the container runs
CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "none"]
# Consider using a password for authentication in production: "--auth", "password", "--password", "your_secure_password"