New-Bing commited on
Commit
971ab30
·
verified ·
1 Parent(s): 6b3bc46

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -13
Dockerfile CHANGED
@@ -1,13 +1,17 @@
1
- FROM debian:sid
2
- RUN apt update
3
- RUN useradd -m -u 1000 user
4
- RUN apt install xfce4-terminal lxde aqemu sudo curl wget aria2 qemu-system-x86 htop chromium screen tigervnc-standalone-server python3-pip python3-websockify python3 git -y
5
- RUN git clone https://github.com/novnc/noVNC.git noVNC
6
- RUN mkdir -p /home/user/.vnc
7
- ARG VNC_PWD
8
- ARG VNC_RESOLUTION
9
- RUN echo $VNC_PWD | vncpasswd -f > /home/user/.vnc/passwd
10
- RUN chmod -R 777 /home/user/.vnc /tmp
11
- ENV HOME=/home/user \
12
- PATH=/home/user/.local/bin:$PATH
13
- CMD vncserver -SecurityTypes VncAuth -rfbauth /home/user/.vnc/passwd -geometry $VNC_RESOLUTION && ./noVNC/utils/novnc_proxy --vnc localhost:5901 --listen 0.0.0.0:7860
 
 
 
 
 
1
+ # 使用 Ubuntu 22.04 作为基础镜像
2
+ FROM ubuntu:22.04
3
+
4
+ # 安装 Shellinabox
5
+ RUN apt-get update && \
6
+ apt-get install -y shellinabox && \
7
+ apt-get clean && \
8
+ rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
9
+
10
+ # 设置 root 用户的密码为 'root'
11
+ RUN echo 'root:123456' | chpasswd
12
+
13
+ # 暴露 22 端口
14
+ EXPOSE 22
15
+
16
+ # 启动 Shellinabox
17
+ CMD ["/usr/bin/shellinaboxd", "-t", "-s", "/:LOGIN"]