ar08 commited on
Commit
b7b6a5d
·
verified ·
1 Parent(s): 528bd46

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Ubuntu as the base image
2
+ FROM ubuntu:latest
3
+
4
+ # Set environment variables
5
+ ENV DEBIAN_FRONTEND=noninteractive
6
+
7
+ # Install necessary packages
8
+ RUN apt-get update && \
9
+ apt-get install -y curl sudo
10
+
11
+ # Install code-server
12
+ RUN curl -fsSL https://code-server.dev/install.sh | sh
13
+
14
+ # Create a user to run code-server
15
+ RUN useradd -m coder && \
16
+ echo 'coder ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
17
+
18
+ # Set the user to 'coder'
19
+ USER coder
20
+
21
+ # Expose the default code-server port
22
+ EXPOSE 8080
23
+
24
+ # Start code-server
25
+ CMD ["code-server", "--bind-addr", "0.0.0.0:8080", "--auth", "none"]
26
+
27
+ # End of Dockerfile