RockSky1 commited on
Commit
f36a9d4
·
verified ·
1 Parent(s): c6fff39

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +33 -0
Dockerfile ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM ubuntu:24.04
2
+
3
+ # Prevent interactive prompts during installation
4
+ ENV DEBIAN_FRONTEND=noninteractive
5
+
6
+ # Update system and install base packages + Ubuntu utilities
7
+ RUN apt-get update && apt-get install -y \
8
+ curl \
9
+ sudo \
10
+ git \
11
+ wget \
12
+ build-essential \
13
+ python3 \
14
+ python3-pip \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Install the latest version of code-server using the official Ubuntu script
18
+ RUN curl -fsSL https://code-server.dev/install.sh | sh
19
+
20
+ # Give the built-in 'ubuntu' user (UID 1000) passwordless sudo rights
21
+ RUN echo "ubuntu ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
22
+
23
+ # Prepare safe workspace directories inside the default ubuntu profile
24
+ RUN mkdir -p /home/ubuntu/workspace && chown -R ubuntu:ubuntu /home/ubuntu
25
+
26
+ USER ubuntu
27
+ WORKDIR /home/ubuntu/workspace
28
+
29
+ # Hugging Face app port
30
+ EXPOSE 7860
31
+
32
+ # Start code-server
33
+ CMD ["code-server", "--bind-addr", "0.0.0.0:7860", "--auth", "password"]