Docker GUI Mac 如何
Docker GUI with Mac how to
我最近开始使用 docker,我在设置现有 docker-桌面图像时遇到问题,并且在我的屏幕上显示为 t。
这将是个性化整个图像的第一步:
我遵循了多个站点的说明,但最简单的是以下站点:
dockerfile/ubuntu-desktop
- 下载图片没问题
当我 运行 它时,我得到以下输出:
$ docker run -it --rm -p 5901:5901 -e USER=root dockerfile/ubuntu-desktop bash -c "vncserver :1 -geometry 1280x800 -depth 24 && tail -F /root/.vnc/*.log"
You will require a password to access your desktops.
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
New 'X' desktop is 0792f104dfd0:1
Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/0792f104dfd0:1.log
03/02/15 14:10:08 Copyright (C) 2000-2007 TightVNC Group
03/02/15 14:10:08 Copyright (C) 1999 AT&T Laboratories Cambridge
03/02/15 14:10:08 All Rights Reserved.
03/02/15 14:10:08 See http://www.tightvnc.com/ for information on TightVNC
03/02/15 14:10:08 Desktop name 'X' (0792f104dfd0:1)
03/02/15 14:10:08 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t
03/02/15 14:10:08 Listening for VNC connections on TCP port 5901
Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring
Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring
Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring
xrdb: No such file or directory
xrdb: can't open file '/root/.Xresources'
AUDIT: Tue Feb 3 14:10:09 2015: 17 Xtightvnc: client 6 rejected from local host
容器检查输出如下:
$ docker inspect -f '{{json .NetworkSettings }}' 0792f104dfd0
{"Bridge":"docker0","Gateway":"172.17.42.1",
"IPAddress":"172.17.0.21","IPPrefixLen":16,
"MacAddress":"02:42:ac:11:00:15",
"PortMapping":null,
"Ports":{"5901/tcp":[{"HostIp":"0.0.0.0","HostPort":"5901"}]}}
当我尝试连接 VCN 时出现错误。
您能帮我找到我应该更改的内容,以便使用 Docker 在 mac 上拥有一个 运行ning 可见的桌面吗?
如果您只是缺少 .Xresources 文件,请尝试在其中添加一个空文件。 This discussion 似乎暗示它并不是真正需要的。您可以使用以下方式添加文件:
docker run -it --rm -p 5901:5901 -e USER=root dockerfile/ubuntu-desktop \
bash -c "touch /root/.Xresources && \
vncserver :1 -geometry 1280x800 -depth 24 && \
tail -F /root/.vnc/*.log"
Docker 在 OSX 上(以及任何非 linux OS)在 boot2docker 虚拟机中运行,并且虚拟机的网络在虚拟机外部的本地主机上不可用.要访问网络接口,请使用 Boot2docker IP,您可以使用 boot2docker ip
命令检索该 IP。此 IP 通常为 192.168.59.103,但不能保证。
我最近开始使用 docker,我在设置现有 docker-桌面图像时遇到问题,并且在我的屏幕上显示为 t。 这将是个性化整个图像的第一步:
我遵循了多个站点的说明,但最简单的是以下站点: dockerfile/ubuntu-desktop
- 下载图片没问题
当我 运行 它时,我得到以下输出:
$ docker run -it --rm -p 5901:5901 -e USER=root dockerfile/ubuntu-desktop bash -c "vncserver :1 -geometry 1280x800 -depth 24 && tail -F /root/.vnc/*.log" You will require a password to access your desktops. Password: Verify: Would you like to enter a view-only password (y/n)? n New 'X' desktop is 0792f104dfd0:1 Creating default startup script /root/.vnc/xstartup Starting applications specified in /root/.vnc/xstartup Log file is /root/.vnc/0792f104dfd0:1.log 03/02/15 14:10:08 Copyright (C) 2000-2007 TightVNC Group 03/02/15 14:10:08 Copyright (C) 1999 AT&T Laboratories Cambridge 03/02/15 14:10:08 All Rights Reserved. 03/02/15 14:10:08 See http://www.tightvnc.com/ for information on TightVNC 03/02/15 14:10:08 Desktop name 'X' (0792f104dfd0:1) 03/02/15 14:10:08 Protocol versions supported: 3.3, 3.7, 3.8, 3.7t, 3.8t 03/02/15 14:10:08 Listening for VNC connections on TCP port 5901 Font directory '/usr/share/fonts/X11/Type1/' not found - ignoring Font directory '/usr/share/fonts/X11/75dpi/' not found - ignoring Font directory '/usr/share/fonts/X11/100dpi/' not found - ignoring xrdb: No such file or directory xrdb: can't open file '/root/.Xresources' AUDIT: Tue Feb 3 14:10:09 2015: 17 Xtightvnc: client 6 rejected from local host
容器检查输出如下:
$ docker inspect -f '{{json .NetworkSettings }}' 0792f104dfd0
{"Bridge":"docker0","Gateway":"172.17.42.1",
"IPAddress":"172.17.0.21","IPPrefixLen":16,
"MacAddress":"02:42:ac:11:00:15",
"PortMapping":null,
"Ports":{"5901/tcp":[{"HostIp":"0.0.0.0","HostPort":"5901"}]}}
当我尝试连接 VCN 时出现错误。
您能帮我找到我应该更改的内容,以便使用 Docker 在 mac 上拥有一个 运行ning 可见的桌面吗?
如果您只是缺少 .Xresources 文件,请尝试在其中添加一个空文件。 This discussion 似乎暗示它并不是真正需要的。您可以使用以下方式添加文件:
docker run -it --rm -p 5901:5901 -e USER=root dockerfile/ubuntu-desktop \
bash -c "touch /root/.Xresources && \
vncserver :1 -geometry 1280x800 -depth 24 && \
tail -F /root/.vnc/*.log"
Docker 在 OSX 上(以及任何非 linux OS)在 boot2docker 虚拟机中运行,并且虚拟机的网络在虚拟机外部的本地主机上不可用.要访问网络接口,请使用 Boot2docker IP,您可以使用 boot2docker ip
命令检索该 IP。此 IP 通常为 192.168.59.103,但不能保证。