void0028 commited on
Commit
8e16166
·
verified ·
1 Parent(s): 873b5f9

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +23 -25
Dockerfile CHANGED
@@ -1,43 +1,41 @@
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 \
14
  curl \
15
  wget \
16
  git \
 
17
  python3 \
18
  python3-pip \
19
  sudo \
 
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"]
 
1
  FROM ubuntu:22.04
2
 
3
+ # 1. PC-Grade Setup
4
  ENV DEBIAN_FRONTEND=noninteractive
5
+ WORKDIR /root
6
 
7
+ # 2. Install God Mode Tools (SSH, Tunnel, PC Power)
8
+ RUN apt-get update && apt-get install -y \
9
+ openssh-server \
 
 
 
 
 
10
  curl \
11
  wget \
12
  git \
13
+ tmux \
14
  python3 \
15
  python3-pip \
16
  sudo \
17
+ htop \
18
  build-essential \
19
  net-tools \
20
  iputils-ping \
21
+ && curl -L https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb -o cloudflared.deb \
22
+ && dpkg -i cloudflared.deb \
23
+ && rm cloudflared.deb \
24
  && rm -rf /var/lib/apt/lists/*
25
 
26
+ # 3. Configure SSH (The Secure Entrance)
27
+ RUN mkdir /var/run/sshd
28
+ # SET YOUR PASSWORD HERE (Replace 'void0028_pass' with something strong)
29
+ RUN echo 'root:void0028_pass' | chpasswd
30
+ RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
31
+ RUN sed -i 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' /etc/pam.d/sshd
32
 
33
+ # 4. System-wide Aliases (For Termux muscle memory in SSH)
34
+ RUN echo "alias pkg='apt'" >> /etc/bash.bashrc && \
35
+ echo "alias python='python3'" >> /etc/bash.bashrc && \
36
+ echo "alias pip='pip3'" >> /etc/bash.bashrc
37
 
38
+ # 5. Launch Command (Using your specific Cloudflare Token)
39
  EXPOSE 7860
40
+ CMD service ssh start && \
41
+ cloudflared tunnel --no-autoupdate run --token eyJhIjoiYTIxZGE4ZDU2NDI0MzZjMTBlNmFjZjFlMjg2YjlkNDkiLCJ0IjoiZjM2NGQzZjAtNGU2Yi00NjMxLWI4OGQtOTc0NTE4YzZkM2Q2IiwicyI6Ik9ERmhZakF5WVRJdFpUSXdOeTAwTlRZMExUazBPREl0T1RFMllqWmxPV1E0TXpFdyJ9