File size: 737 Bytes
ef2c152
 
4b58f4d
ef2c152
0ebd3f7
 
ef2c152
4b58f4d
 
ef2c152
a5e9dd1
ef2c152
 
 
 
 
f7351b4
ef2c152
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Use the official Visual Studio Code Server image
FROM codercom/code-server:latest

# 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"]