test / Dockerfile
lachine's picture
Create Dockerfile
57a5292 verified
raw
history blame
1.4 kB
FROM debian:sid
RUN apt update
RUN useradd -m -u 1000 user
RUN apt install xfce4-terminal lxde aqemu sudo curl wget xdotool aria2 qemu-system-x86 htop chromium screen tigervnc-standalone-server python3-pip python3-websockify python3 git -y
RUN git clone https://github.com/novnc/noVNC.git noVNC
RUN mkdir -p /home/user/.vnc
# 添加微软的 GPG 密钥
RUN wget -O - https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /usr/share/keyrings/microsoft.gpg
# 添加微软的 Edge 仓库
RUN sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/microsoft.gpg] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge.list'
# 安装 Edge 浏览器
RUN apt update && apt install -y microsoft-edge-stable
RUN mkdir -p /home/user/Desktop/myshell
ARG VNC_PWD
ARG VNC_RESOLUTION
RUN echo $VNC_PWD | vncpasswd -f > /home/user/.vnc/passwd
RUN chmod -R 777 /home/user/.vnc /tmp /home/user/Desktop/myshell
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
# 假设pushcookie文件夹在当前目录下
ADD pushcookie/ /home/user/Desktop/myshell/
# 使用RUN指令执行chmod命令给予*.sh文件可执行权限
RUN chmod +x /home/user/Desktop/myshell/*.sh
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