Docker Ubuntu容器安装桌面

安装Ubuntu

参考链接

1
2
3
4
5
6
7
8
9
10
11
docker run -itd --name desktop -p 10022:22 -p 3389:3389 ubuntu:latest
docker run -itd --name desktop -p 10022:22 -p 3389:3389 ourfor/ubuntu
docker exec -it desktop /bin/bash
apt update
sudo DEBIAN_FRONTEND=noninteractive apt-get -y install ubuntu-gnome-desktop
apt install gnome-session
apt-get -y install xrdp
systemctl enable xrdp


echo gnome-session >~/.xsession