当前位置: 首页 > news >正文

Docker与VNC的使用

https://hub.docker.com/r/dorowu/ubuntu-desktop-lxde-vnc

下载nvc

客户端
https://downloads.realvnc.com/download/file/viewer.files/VNC-Viewer-7.12.0-Windows.exe

服务端

docker pull dorowu/ubuntu-desktop-lxde-vnc

#下载成功
docker pull dorowu/ubuntu-desktop-lxde-vnc
Using default tag: latest
latest: Pulling from dorowu/ubuntu-desktop-lxde-vnc
Digest: sha256:775184eaa5bbc01bc4261a6c9596a642b3b43a433c1508637567bc724575964b
Status: Image is up to date for dorowu/ubuntu-desktop-lxde-vnc:latest
docker.io/dorowu/ubuntu-desktop-lxde-vnc:latest

#验证
docker images
REPOSITORY                       TAG       IMAGE ID       CREATED       SIZE
dorowu/ubuntu-desktop-lxde-vnc   latest    775184eaa5bb   4 years ago   1.92GB
启动
	docker run --rm --privileged -v /dev:/dev \
	--name ubuntu-desktop-lxde-vnc \
	-p 6080:80 \
	-p 5900:5900 \
	-e USER=much \
	-e PASSWORD=much \
	-e HTTP_PASSWORD=much \
	-e VNC_PASSWORD=much \
	-v ~/work:/home/much/work \
	-v ~/.gitconfig:/home/much/work/.gitconfig:ro \
	-e RESOLUTION=1280x720 \
	dorowu/ubuntu-desktop-lxde-vnc 


#用户不存在
docker exec --user much -it ubuntu-desktop-lxde-vnc /bin/bash
no users found

#连接成功
docker exec --user much -it ubuntu-desktop-lxde-vnc /bin/bash
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

much@6d5d859d8680:/root$ whoami
much	

#删除用户
sudo userdel -r much
# 选择工作空间 
docker exec  --user much -it  --workdir /home/much/work ubuntu-desktop-lxde-vnc  /bin/bash
连接

在这里插入图片描述
在这里插入图片描述

参考链接

https://blog.csdn.net/qq_20330595/article/details/139932582
https://blog.csdn.net/qq_20330595/article/details/134799908

http://www.dtcms.com/a/117046.html

相关文章:

  • Spring MVC 数据绑定教程
  • nginx配置oss代理
  • [环境配置] 2. 依赖库安装
  • Linux-CentOS-7—— 配置yum源(网络yum源 + 本地yum源)
  • RabbitMQ安装与使用教程(含Spring Boot整合)
  • HTTP Form v.s. Flask-WTF Form v.s. Bootstrap Form
  • Ollama
  • 项目实战--路由权限
  • OpenCV 图形API(20)用于执行标量与矩阵之间的逐元素减法操作函数subRC()
  • Dify的基本功能介绍与界面初识
  • 当实体类中的属性名和表中的字段名不一样 ,怎么办
  • Comfyui 一键下载模型(多线程)
  • COMSOL固体力学接触
  • LLM面试题七
  • 2024年RAG大赛
  • Async 注解原理分析
  • ARK no NIGHTS
  • 25、Python 文件操作与JSON处理:从基础到实战
  • ArkTS语言入门细节之联合类型
  • 数据仓库的核心架构与关键技术(数据仓库系列二)
  • Minio文件系统
  • 生鲜果蔬便利店实体零售门店商城小程序
  • 底盘---麦克纳姆轮(Mecanum Wheel)
  • 重温java 系列一 Java基础
  • xv6-labs-2024 lab2
  • Python高阶函数-map
  • 接口自动化测试框架搭建
  • Pythia 使用说明
  • GPT-4o 的“图文合体”是怎么做到的
  • 成为社交场的导演而非演员