1 Star 0 Fork 0

DeeZeng / Dockerfile-Ubuntu-Gnome

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

Ubuntu Desktop (GNOME 3) Dockerfile

This repository contains the Dockerfile and associated files for setting up a container with Ubuntu, GNOME 3, TigerVNC and noVNC.

  • The VNC Server currently defaults to 1366*768 24bit.

Dependencies

Usage

Container actions

  • Start container:

    sudo docker run --name=ubuntu-gnome -d --rm \
      --tmpfs /run --tmpfs /run/lock --tmpfs /tmp \
      --cap-add SYS_BOOT --cap-add SYS_ADMIN \
      -v /sys/fs/cgroup:/sys/fs/cgroup \
      -p 5901:5901 -p 6901:6901 \
      darkdragon001/ubuntu-gnome-vnc
  • Open (root) shell:

    sudo docker exec -it ubuntu-gnome bash
  • Open shell as user:

    sudo docker exec -it -u default ubuntu-gnome bash
  • Stop container:

    sudo docker stop ubuntu-gnome

Connecting to instance

  • Connect to vnc://<host>:5901 via your VNC client.
  • Connect to http://<host>:6901 via your web browser.

NOTE The password is hardcoded to acoman.

Using the desktop

  • Gain root access via sudo

Known issues

  • Sidebar/dock hidden by default
  • User switching / gdm3 not working

Not tested

  • Sound (PulseAudio)

Dee

如果要 VNC 不要那么多权限启动 (因为现在要宿主机的权限过多)

  • 可以先设置docker内访问dbus:https://georgik.rocks/how-to-start-d-bus-in-docker-container/

  • Ubuntu:

    dbus-uuidgen > /var/lib/dbus/machine-id

    mkdir -p /var/run/dbus

    dbus-daemon --config-file=/usr/share/dbus-1/system.conf --print-address

  • 再 vncserver 启动时 。带参数 (带上 localhost no 那一串,如果加 会启动不了) 如: /usr/bin/vncserver :1 -geometry 1366x768 -depth 24 -localhost no -fg

启动指令可以简化为:
docker run -it --rm xxx:tag /bin/bash
The MIT License (MIT) Copyright (c) Pete Birley Copyright (c) Dockerfile Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

from https://github.com/darkdragon-001/Dockerfile-Ubuntu-Gnome 展开 收起
Dockerfile 等 2 种语言
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/deezeng/Dockerfile-Ubuntu-Gnome.git
git@gitee.com:deezeng/Dockerfile-Ubuntu-Gnome.git
deezeng
Dockerfile-Ubuntu-Gnome
Dockerfile-Ubuntu-Gnome
master

搜索帮助