void0028 commited on
Commit
e62346a
·
verified ·
1 Parent(s): 1c8d08a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM node:18-bullseye
2
+
3
+ # Install basics
4
+ RUN apt-get update && apt-get install -y \
5
+ bash \
6
+ git \
7
+ curl \
8
+ wget \
9
+ nano \
10
+ python3 \
11
+ python3-pip \
12
+ && rm -rf /var/lib/apt/lists/*
13
+
14
+ # Install ttyd (the web terminal)
15
+ RUN curl -L https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -o /usr/bin/ttyd \
16
+ && chmod +x /usr/bin/ttyd
17
+
18
+ # Create a user so we aren't root (safer)
19
+ RUN useradd -m -u 1000 user
20
+ USER user
21
+ WORKDIR /home/user
22
+
23
+ # Expose the HF port
24
+ EXPOSE 7860
25
+
26
+ # Start the terminal on port 7860
27
+ # -W means writeable (you can type)
28
+ CMD ["ttyd", "-p", "7860", "-W", "bash"]