Spaces:
Running
Running
Create Dockerfile
Browse files- Dockerfile +14 -0
Dockerfile
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Use the official Visual Studio Code Server image
|
2 |
+
FROM codercom/code-server:latest
|
3 |
+
# Set the user as root with the custom name
|
4 |
+
USER root
|
5 |
+
# Expose the default port used by Visual Studio Code Server
|
6 |
+
EXPOSE 7860
|
7 |
+
# Set a password for authentication
|
8 |
+
ENV PASSWORD="PrivatePass123#"
|
9 |
+
# Copy any additional extensions or settings you want to include
|
10 |
+
# For example, if you have a list of extensions in a file called extensions.txt:
|
11 |
+
# COPY extensions.txt /home/coder/extensions.txt
|
12 |
+
# RUN cat /home/coder/extensions.txt | xargs -n 1 code-server --install-extension
|
13 |
+
# Start Visual Studio Code Server on container startup with password protection
|
14 |
+
ENTRYPOINT ["dumb-init", "code-server", "--bind-addr", "0.0.0.0:7860", ".", "--auth", "password"]
|