繁体   English   中英

Mac的Docker GUI如何

[英]Docker GUI with Mac how to

我最近开始使用docker,但是在设置现有docker-desktop图像并在屏幕上显示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上拥有运行中的可见桌面的更改?

如果只是缺少.Xresources文件,请尝试在其中添加一个空文件。 该讨论似乎暗示着它并不是真正需要的。 您可以使用以下方法添加文件:

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"

OSX(和任何非Linux操作系统)上的Docker在boot2docker vm内运行,并且该VM的网络在VM之外的localhost上不可用。 要进入网络接口,请使用Boot2docker IP,您可以使用boot2docker ip命令检索该boot2docker ip 该IP通常为192.168.59.103,尽管不能保证。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM