vscode / Dockerfile
rvc11's picture
Update Dockerfile
551883c verified
raw
history blame
817 Bytes
# Use NVIDIA CUDA image
FROM nvidia/cuda:12.9.1-cudnn-devel-ubuntu24.04
RUN apt install curl wget dumb-init -y
RUN curl http://code-server.dev/install.sh -fsSL | bash
# Set the user as root with the custom name
USER root
# Expose the default port used by Visual Studio Code Server
EXPOSE 7860
# Set a password for authentication
ENV PASSWORD="PrivatePass123#"
# Copy any additional extensions or settings you want to include
# For example, if you have a list of extensions in a file called extensions.txt:
# COPY extensions.txt /home/coder/extensions.txt
# RUN cat /home/coder/extensions.txt | xargs -n 1 code-server --install-extension
# Start Visual Studio Code Server on container startup with password protection
ENTRYPOINT ["dumb-init", "code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "password"]