0%

297_整理几个开箱即用的docker桌面linux

QQ群:397745473

297_整理几个开箱即用的docker桌面linux

Docker环境安装

安装Docker环境并选择合适的 docker-compose 版本

常用版本

1
2
3
4
5
curl -sSL https://get.docker.com/ | CHANNEL=stable bash

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

最新版本

1
2
3
4
5
curl -sSL https://get.docker.com/ | CHANNEL=stable bash

sudo curl -L "https://github.com/docker/compose/releases/download/v2.16.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

sudo chmod +x /usr/local/bin/docker-compose

常用打洞工具

如果不能出网可以通过打洞工具快速映射出端口

Cloudflared

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
参考: https://twitter.com/wesbos/status/1634310926219333642
Nice free ngrok alternative.

# -- Use Cloudflare tunnels to proxy your localhost application to the outside world with https.
1. brew install cloudflared
2. cloudflared tunnel --url http://localhost:6969

# -- Also, setup a re-usable named tunnels on your own domain name so you have a consistent URL:
1. cloudflared tunnel login
2. cloudflared tunnel create local
3. cloudflared tunnel route dns local http://local.yourdomain.com
4. cloudflared tunnel run --url http://localhost:9999 local


# https://github.com/leejoneshane/docker-ezgo-vdi
## 启动容器
# 中英文正常 容器有点大 10.6G 支持RDP和声音 用户名密码都是 ezgo
docker run -p 888:80 -d leejoneshane/ezgo-vdi
docker run -p 3389:3389 -d leejoneshane/ezgo-vdi


# 用公共的cloudflare做映射
curl -Lo /usr/bin/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cloudflared
下面这条命令参考: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/install-and-setup/tunnel-guide/local/local-management/ingress/
cloudflared tunnel --url tcp://localhost:3389
cloudflared tunnel --url rdp://127.0.0.1:3389

# 在windows本地执行
exe 下载地址: https://github.com/cloudflare/cloudflared/releases
# 会显示一个框里面的网址就是ws地址 https://chapel-kidney-finishing-integration.trycloudflare.com
.\cloudflared-windows-amd64.exe access rdp --hostname https://chapel-kidney-finishing-integration.trycloudflare.com --url rdp://localhost:13389 --loglevel debug

其他打洞工具

tmate 蛮不错的

1
2
3
4
https://tunnelto.dev
https://localtunnel.me --> https://theboroer.github.io/localtunnel-www/
https://github.com/antoniomika/sish
https://tmate.io

常用的docker免费平台

1
2
https://shell.cloud.google.com/
https://gitpod.io/ (Gitpod对开源软件完全免费,但有每月50个小时的限制)

开箱即用

在线VNC浏览器

中文有点乱码

1
2
# 官网 https://hub.docker.com/r/jlesage/firefox
docker run -d --name=firefox -p 444:5800 -v /docker/appdata/firefox:/config:rw jlesage/firefox

浏览器(推荐)

无乱码,需要手动启动浏览器.有密码 中英文正常

可以到官方查参考,还支持浏览器 Firefox Chrome Edge 各种版本

1
2
3
4
5
6
7
8
9
# 官网 https://github.com/SeleniumHQ/docker-selenium

# 密码: secret 无乱码,需要手动启动.有密码 中英文正常
docker run -d -p 4444:4444 -p 7900:7900 --shm-size="2g" selenium/standalone-firefox:4.8.1-20230306
docker run --rm -itd -p 4445:4444 -p 7901:7900 --shm-size 2g selenium/standalone-firefox:beta
docker run --rm -it -p 4444:4444 -p 7900:7900 --shm-size 2g selenium/standalone-chrome:beta
snap remove firefox
sudo apt-get install firefox
sudo apt-get install firefox-geckodriver

各种开箱即用的应用

与 kasmweb 相似

1
2
3
4
# 官网 https://docs.linuxserver.io/  

lscr.io/linuxserver/firefox:latest 支持文件上传 但中文乱码
lscr.io/linuxserver/chromium:latest 支持文件上传 声音 但中文乱码

neko

1
2
3
https://neko.m1k1o.net/
https://github.com/m1k1o/neko
https://github.com/m1k1o/neko-rooms

linux 操作系统

中英文正常 容器有点大 10.6G 支持RDP和声音 用户名密码都是 ezgo

支持RDP

1
2
docker run -p 888:80 -d leejoneshane/ezgo-vdi
docker run -p 3389:3389 -d leejoneshane/ezgo-vdi

VNC桌面环境

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc#license

docker run -itd -p 5900:80 -e VNC_PASSWORD=mypassword -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc

docker run -itd -p 6080:80 -p 5900:5900 -e HTTP_PASSWORD=mypassword -e VNC_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc:bionic

docker run -itd -p 6080:80 -p 5900:5900 -e RESOLUTION=1920x1080 -e USER=zs -e PASSWORD=mypassword -e HTTP_PASSWORD=mypassword -e VNC_PASSWORD=mypassword dorowu/ubuntu-desktop-lxde-vnc:bionic

docker run -itd -p 5900:80 --shm-size=2000m --restart always --name=vnc -e VNC_PASSWORD=yb67Yq6K5kBG387TDaz6 -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc

docker run -p 8080:80 dorowu/ubuntu-desktop-lxde-vnc

docker run -p 6080:80 -e USER=doro -e PASSWORD=password -v /dev/shm:/dev/shm dorowu/ubuntu-desktop-lxde-vnc

docker run -itd -p 444:80 -e VNC_PASSWORD=yb67Yq6K5kBG387TDaz6 --device /dev/snd -e ALSADEV=hw:2,0 dorowu/ubuntu-desktop-lxde-vnc

docker-openbox-desktop-vnc

小巧耐用 本地编译 十分纯净

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# https://github.com/alekna/docker-openbox-desktop-vnc

git clone https://github.com/alekna/docker-openbox-desktop-vnc.git
docker build -t="vsyour/openbox" .
docker run -itd --name vnc -p 5900:5900 -p 3389:3389 -p 6900:6900 vsyour/openbox

# 参考 https://www.server-world.info/en/note?os=Debian_11&p=desktop&f=8
docker exec -it vnc bash
apt -y install novnc python3-websockify net-tools sudo wget
openssl req -x509 -nodes -newkey rsa:3072 -keyout novnc.pem -out novnc.pem -days 3650

vncserver # 执行后会出现novnc的监听的端口, 把下面的最后一个端口直接改成这个vnc的端口就可以用novnc了。密码是root
websockify -D --web=/usr/share/novnc/ --cert=/home/debian/novnc.pem 6900 127.0.0.1:5901

# 安装火狐浏览器 下面字体一定要装,不然中文乱码
apt-get install ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy ttf-wqy-microhei ttf-wqy-zenhei xfonts-wqy firefox-esr

# 下面字体可以不装
sudo dpkg-reconfigure locales
sudo apt-get install language-pack-ja language-pack-zh* language-pack-ko
sudo apt-get install japan* chinese* korean*
sudo apt-get install fonts-arphic-ukai fonts-arphic-uming fonts-ipafont-mincho fonts-ipafont-gothic fonts-unfonts-core

# chrome 浏览器安装
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg --install google-chrome-stable_current_amd64.deb
sudo apt install --assume-yes --fix-broken
# 启动: google-chrome --no-sandbox

Docker 中开Docker

1
https://github.com/mviereck/x11docker#introduction

QQ群:397745473

欢迎关注我的其它发布渠道