void0028 commited on
Commit
7f33a2e
·
verified ·
1 Parent(s): 3b86e58

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -16
Dockerfile CHANGED
@@ -1,13 +1,13 @@
1
  FROM ubuntu:22.04
2
 
3
- # 1. Supress interactive prompts during build
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
- # 2. Update & Install the "PC Standard" suite
7
- # We include build-essential (gcc/make), net-tools, and system utilities
8
  RUN apt-get update && \
9
  apt-get install -y \
10
  ttyd \
 
11
  bash \
12
  nano \
13
  vim \
@@ -20,27 +20,24 @@ RUN apt-get update && \
20
  build-essential \
21
  net-tools \
22
  iputils-ping \
23
- zip \
24
- unzip \
25
  htop \
26
  neofetch \
27
  && rm -rf /var/lib/apt/lists/*
28
 
29
- # 3. CONVENIENCE HACKS
30
- # Alias 'pkg' to 'apt' so your Termux muscle memory works
31
  RUN echo "alias pkg='apt'" >> /root/.bashrc
32
- # Alias 'python' to 'python3' (Ubuntu only has python3 by default)
33
  RUN echo "alias python='python3'" >> /root/.bashrc
34
- # Alias 'pip' to 'pip3'
35
  RUN echo "alias pip='pip3'" >> /root/.bashrc
36
 
37
- # 4. Set working directory to root's home
38
- WORKDIR /root
 
39
 
40
- # 5. Open the port for the web terminal
41
  EXPOSE 7860
42
 
43
- # 6. LAUNCH AS ROOT
44
- # -W: Writable (you can type)
45
- # -t: Enable generic terminal features
46
- CMD ["ttyd", "-p", "7860", "-W", "-t", "rendererType=canvas", "bash"]
 
 
1
  FROM ubuntu:22.04
2
 
3
+ # 1. Supress interactive prompts
4
  ENV DEBIAN_FRONTEND=noninteractive
5
 
6
+ # 2. Install the basics PLUS 'tmux' (The Session Keeper)
 
7
  RUN apt-get update && \
8
  apt-get install -y \
9
  ttyd \
10
+ tmux \
11
  bash \
12
  nano \
13
  vim \
 
20
  build-essential \
21
  net-tools \
22
  iputils-ping \
 
 
23
  htop \
24
  neofetch \
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
+ # 3. Aliases for muscle memory
 
28
  RUN echo "alias pkg='apt'" >> /root/.bashrc
 
29
  RUN echo "alias python='python3'" >> /root/.bashrc
 
30
  RUN echo "alias pip='pip3'" >> /root/.bashrc
31
 
32
+ # 4. Configure Tmux to look good (Optional but nice)
33
+ # Enables mouse support so you can scroll inside the terminal
34
+ RUN echo "set -g mouse on" > /root/.tmux.conf
35
 
36
+ WORKDIR /root
37
  EXPOSE 7860
38
 
39
+ # 5. THE MAGIC COMMAND
40
+ # Instead of running 'bash', we run 'tmux'.
41
+ # "new -A -s main" means:
42
+ # "Create a session named 'main'. If 'main' already exists, ATTACH to it instead of creating a new one."
43
+ CMD ["ttyd", "-p", "7860", "-W", "tmux", "new", "-A", "-s", "main"]