docker-desktop

授权协议 Readme
开发语言 SHELL
所属分类 应用工具、 终端/远程登录
软件类型 开源软件
地区 不详
投 递 者 锺离玮
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

DOCKER-DESKTOP

Description

This Dockerfile creates a docker image and once it's executed it creates a container that runs X11 and SSH services.The ssh is used to forward X11 and provide you encrypted data communication between the docker container and your local machine.

Xpra + Xephyr allows to display the applications running inside of the container such as Firefox, LibreOffice, xterm, etc. with recovery connection capabilities. Xpra also uses a custom protocol that is self-tuning and relatively latency-insensitive, and thus is usable over worse links than standard X.

The applications can be rootless, so the client machine manages the windows that are displayed.

Fluxbox and ROX-Filer creates a very minimalist way to manage windows and files.

OBS: The client machine needs to have a X11 server installed (Xpra). See the "Notes" below.

Docker Installation

On Ubuntu:

Docker is available as a Ubuntu PPA (Personal Package Archive), hosted on launchpad which makes installing Docker on Ubuntu very easy.

#Add the PPA sources to your apt sources list.
sudo apt-get install python-software-properties && sudo add-apt-repository ppa:dotcloud/lxc-docker
 
# Update your sources
sudo apt-get update
 
# Install, you will see another warning that the package cannot be authenticated. Confirm install.
sudo apt-get install lxc-docker

On Windows:

Requirements:

On Mac OS X:

Requirements:

Installation

Building the docker image

$ docker build -t rogaha/docker-desktop git://github.com/rogaha/docker-desktop.git

OR

$ git clone https://github.com/rogaha/docker-desktop.git
$ cd docker-desktop
$ docker build -t [username]/docker-desktop .

Running the docker image created (-d: detached mode, -P: expose the port 22 on the host machine)

$ CONTAINER_ID=$(docker run -d -P [username]/docker-desktop)

Getting the password generated during runtime

$ echo $(docker logs $CONTAINER_ID | sed -n 1p)
User: docker Password: xxxxxxxxxxxx
# where xxxxxxxxxxxx is the password created by PWGen that contains at least one capital letter and one number

Usage

Getting the container's external ssh port

$ docker port $CONTAINER_ID 22
49153 # This is the external port that forwards to the ssh service running inside of the container as port 22

Connecting to the container

Starting the a new session

$ ifconfig | grep "inet addr:" 
inet addr:192.168.56.102  Bcast:192.168.56.255  Mask:255.255.255.0 # This is the LAN's IP for this machine

$ ssh docker@192.168.56.102 -p 49153 "sh -c './docker-desktop -s 800x600 -d 10 > /dev/null 2>&1 &'" # Here is where we use the external port
docker@192.168.56.102's password: xxxxxxxxxxxx 

$ ./docker-desktop -h

-----------------------------------------------------------
Usage: docker-desktop [-s screen_size] [-d session_number]
-s : screen resolution (Default = 800x600
-d : session number (Default = 10)
-h : help
-----------------------------------------------------------

Attaching to the session started

$ xpra --ssh="ssh -p 49153" attach ssh:docker@192.168.56.102:10 # user@ip_address:session_number
docker@192.168.56.102's password: xxxxxxxxxxxx 

If you want to execute rootless programs, you just need to connect to the container via ssh and type:DISPLAY=:[session_number] [program_name] &

Eg. DISPLAY=:10 firefox &

Notes

On Windows:

Requirements:

On OS X:

Requirements:

On Linux:

Requirements:

  • Xpra: You can use apt-get to install it -> apt-get install xpra
  • Path: /usr/bin/xpra
  • @TOC 一、首先系统安装Debian11.0linux系统,并修改配置信息 1、切换安装源为alibaba debian 11.x (bullseye) 1.1编辑sudo vim /etc/apt/sources.list文件 (需要使用sudo), 在文件最前面添加以下条目(操作前请做好相应备份) deb http://mirrors.aliyun.com/debian/ bullseye

  • Windows安装docker-desktop,默认下载镜像都会放在C盘导致,C盘占用快速增长,为此需要修改默认存放路径,修改办法是通过wsl来迁移原本的两个发行版docker-desktop和docker-desktop-data,最好在首次安装好docker-desktop就执行。具体操作如下,操作前先停止docker: 查看发行版情况,此时两个都在stopped wsl -l -v --al

  • 由于docker-desktop采用了wsl2基础引擎,目前没有开放可视化修改镜像的路径,根据以下步骤可以手动修改镜像路径。 暂停docker wsl --shutdown 导出原有镜像 wsl --export docker-desktop-data d:\docker\data\docker-desktop-data.tar wsl --export docker-desktop d:\d

  •  解决方案 1. 进入C:Program FilesDockerDocker cd "C:Program FilesDockerDocker" DockerCli.exe -SwitchDaemon 2. 将数据备份,对docker进行重置,管理员权限运行cmd执行一下命令 netsh winsock reset

  • 管理员方式执行cmd命令    cmd窗口运行 :netsh winsock reset  接着(重要):  在cmd窗口右键,点击属性,将使用旧版控制台取消勾选 重启Docker Desktop 完美解决!

  • 基础架构系列篇-系统WIN10安装DOCKER-DESKTOP环境 系统环境版本说明win10(>19版) 支持wls2方式 相关说明. 1. 下载与安装docker-desktop 下载地址 https://hub.docker.com/editions/community/docker-ce-desktop-windows/ 安装exe可执行文件 方式1 1. 编写脚本与运行 以下内容保存至c

 相关资料
  • 我只是尝试WSL 2与Docker的Windows和我有一个问题与安装卷: 容器构建和启动良好,我使用docker exec很好地访问它,但是容器中的文件夹没有绑定到我的笔记本电脑文件夹。但是,正确的路径实际上正确地安装在运行的容器上: (这里我在主机上进行pwd,以确定它是否与安装在容器上的内容完全匹配) 这是portainer的屏幕,告诉我容器中安装了什么路径,所有内容都匹配。 我在主机上的应

  • 一、解决的问题 二、与虚拟机的比较 三、优势 四、使用场景 五、镜像与容器 参考资料 一、解决的问题 由于不同的机器有不同的操作系统,以及不同的库和组件,在将一个应用部署到多台机器上需要进行大量的环境配置操作。 Docker 主要解决环境配置问题,它是一种虚拟化技术,对进程进行隔离,被隔离的进程独立于宿主操作系统和其它隔离的进程。使用 Docker 可以不修改应用程序代码,不需要开发人员学习特定环

  • 我检查了垃圾箱,里面没有ping

  • 第一章 Docker介绍1 1.1 docker简介 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的\[Linux\]机器上,也可以实现\[虚拟化\]。容器是完全使用\[沙箱\]机制,相互之间不会有任何接口。 1.2 Docker是什么? Docker是一个程序运行、测试、交付的开放平台,Docker被设计为能够使你快速地交

  • 推荐使用 Swoole 官方 Docker:https://github.com/swoole/docker-swoole

  • Docker Commands Commands Notes docker ps -a Show all containers on the system docker ps Show only currently running containers docker run <NAME> Creates & runs a docker container via an image docker i