accetto/ubuntu-vnc-xfceDocker Hub - Git Hub - Changelog - Wiki
Tip If you want newer images based on Ubuntu 20.04 LTS with the latest TigerVNC/noVNC versions, please check the third generation (G3) accetto/ubuntu-vnc-xfce-g3, accetto/ubuntu-vnc-xfce-chromium-g3 or accetto/ubuntu-vnc-xfce-firefox-g3.
Tip Unless you need the nss_wrapper, you can also use the second generation (G2) image accetto/xubuntu-vnc-novnc, which is a streamlined version of this image (image hierarchy). The image supports also the sudo command.
This repository contains resources for building Docker images based on Ubuntu 18.04 LTS with Xfce desktop environment and VNC/noVNC servers for headless use.
The images can be successfully built and used on Linux, Windows, Mac and NAS devices. It has been tested with Docker Desktop on Ubuntu flavours, Windows 10 and Container Station from QNAP.
This is the first generation (G1) of my headless images, that I've retired back in March 2022. However, because I've noticed that the images are still pulled, I've revived the project in November 2022.
The current second version (G1v2) brings some improvements, mostly in the building pipeline and supporting scripts.
It also merges the previously separated GitHub projects ubuntu-vnc-xfce-firefox, ubuntu-vnc-xfce-firefox-plus and ubuntu-vnc-xfce-chromium into this single one.
This image accetto/ubuntu-vnc-xfce is the base image of my other Docker images with additional features (accetto/ubuntu-vnc-xfce-firefox-plus, accetto/ubuntu-vnc-xfce-firefox-default and accetto/ubuntu-vnc-xfce-chromium).
Containers created from this image are perfect for learning, development or testing, because they can be easily used headless via web browsers (over noVNC) or VNC viewers (e.g. TigerVNC or TightVNC). Both lite and full noVNC clients are provided.
While the containers do not include any web browsers, the mousepad and vim editors and the ping utility are already included. Other applications can be easily added also at runtime, because the containers run under the privileged root user.
It should be noticed, that the container's root is not the same as the host's root and that it does not automatically get all root privileges on the hosting computer. Please check the Docker documentation for more information about it (e.g. Runtime privilege and Linux capabilities).
Running in background is the primary scenario for the containers, but using them interactively in foreground is also possible. For examples see the description below or the HOWTO section in Wiki.
The image contains the following components:
The image is regularly maintained and rebuilt. The history of notable changes is documented in CHANGELOG.
accetto/ubuntu-vnc-xfce
Images based on the official ubuntu images.
latest based on ubuntu:latest
Following TCP ports are exposed:
The default VNC user password is headless.
The containers do not create or use any external volumes by default. However, the following folders make good mounting points:
Both named volumes and bind mounts can be used. More about volumes can be found in the Docker documentation (e.g. Manage data in Docker).
Version sticker serves multiple purposes that are closer described in Wiki. The version sticker value identifies the version of the docker image and it is persisted in it when it is built. It is also shown as a badge in the README file.
However, the script version_sticker.sh can be used anytime for convenient checking of the current versions of installed applications.
The script is deployed into the startup folder, which is defined by the environment variable STARTUPDIR with the default value of /dockerstartup.
If the script is executed inside a container without an argument, then it returns the current version sticker value of the container. This value is newly calculated and it is based on the current versions of the essential applications in the container.
The current version sticker value will differ from the persisted value, if any of the included application has been updated to another version.
If the script is called with the argument -v (lower case v), then it prints out verbose versions of the essential applications that are included in the version sticker value.
If it is called with the argument -V (upper case v), then it prints out verbose versions of some more applications.
Examples can be found in Wiki.
The containers run under the privileged root user by default. However, it's the container's root, which is not the same as the root of the hosting computer (see above).
The following container will listen on automatically selected TCP ports of the host computer:
dockerdocker run -d -P accetto/ubuntu-vnc-xfce
The following container will listen on the host's explicit TCP ports 25901 (VNC) and 26901 (noVNC):
dockerdocker run -d -p 25901:5901 -p 26901:6901 accetto/ubuntu-vnc-xfce
The following container will create or re-use the local named volume my_Downloads mounted as /headless/Downloads:
dockerdocker run -d -P -v my_Downloads:/home/headless/Downloads accetto/ubuntu-vnc-xfce
or using the newer syntax with --mount flag:
dockerdocker run -d -P --mount source=my_Downloads,target=/home/headless/Downloads accetto/ubuntu-vnc-xfce
More usage examples can be found in Wiki (section HOWTO).
The image supports the following container start-up options: --wait (default), --skip, --debug (also --tail-log) and --help.
The following container will print out the help and then it'll remove itself:
dockerdocker run --rm accetto/ubuntu-vnc-xfce --help
Excerpt from the output, which describes the other options:
dockerOPTIONS: -w, --wait (default) Keeps the UI and the vnc server up until SIGINT or SIGTERM are received. An optional command can be executed after the vnc starts up. example: docker run -d -P accetto/ubuntu-vnc-xfce example: docker run -it -P --rm accetto/ubuntu-vnc-xfce bash -s, --skip Skips the vnc startup and just executes the provided command. example: docker run -it -P --rm accetto/ubuntu-vnc-xfce --skip echo $BASH_VERSION -d, --debug Executes the vnc startup and tails the vnc/noVNC logs. Any parameters after '--debug' are ignored. CTRL-C stops the container. example: docker run -it -P --rm accetto/ubuntu-vnc-xfce --debug -t, --tail-log same as '--debug' -h, --help Prints out this help. example: docker run --rm accetto/ubuntu-vnc-xfce
It should be noticed, that the --debug start-up option does not show the command prompt even if the -it run arguments are provided. This is because the container is watching the incoming vnc/noVNC connections and prints out their logs in real time. However, it is easy to attach to the running container like in the following example.
In the first terminal window on the host computer, create a new container named foo:
dockerdocker run --name foo accetto/ubuntu-vnc-xfce --debug
In the second terminal window on the host computer, execute the shell inside the foo container:
dockerdocker exec -it foo /bin/bash
There are two ways, how to use the created headless containers. Note that the default VNC user password is headless.
To be able to use the containers over VNC, some VNC Viewer is needed (e.g. TigerVNC or TightVNC).
The VNC Viewer should connect to the host running the container, pointing to its TCP port mapped to the container's TCP port 5901.
For example, if the container has been created on the host called mynas using the parameters described above, the VNC Viewer should connect to mynas:25901.
To be able to use the containers over noVNC, an HTML5 capable web browser is needed. It actually means, that any current web browser can be used.
The browser should navigate to the host running the container, pointing to its TCP port mapped to the container's TCP port 6901.
However, since the version 1.2.0 the containers offer two noVNC clients. Additionally to the previously available lite client there is also the full client with more features. The connection URL differs slightly in both cases. To make it easier, a simple startup page is implemented.
If the container has been created on the host called mynas using the parameters described above, then the web browser should navigate to [***].
The startup page will show two hyperlinks pointing to the both noVNC clients:
[***][***]It's also possible to provide the password through the links:
[***][***]If you have found a problem or you just have a question, please check the Issues and the Troubleshooting, FAQ and HOWTO sections in Wiki first. Please do not overlook the closed issues.
If you do not find a solution, you can file a new issue. The better you describe the problem, the bigger the chance it'll be solved soon.
This project has been originally inspired by the old docker image consol/ubuntu-xfce-vnc and derived from the old first version of the GitHub repository ConSol/docker-headless-vnc-container.
Credit also goes to all the countless people and companies who contribute to open source community and make so many dreamy things real.
探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
在 Linux 系统配置镜像服务
在 Docker Desktop 配置镜像
Docker Compose 项目配置
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
MacOS OrbStack 容器配置
在宝塔面板一键配置镜像
Synology 群晖 NAS 配置
飞牛 fnOS 系统配置镜像
极空间 NAS 系统配置服务
爱快 iKuai 路由系统配置
绿联 NAS 系统配置镜像
QNAP 威联通 NAS 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
无需登录使用专属域名
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
免费版仅支持 Docker Hub 访问,不承诺可用性和速度;专业版支持更多镜像源,保证可用性和稳定速度,提供优先客服响应。
专业版支持 docker.io、gcr.io、ghcr.io、registry.k8s.io、nvcr.io、quay.io、mcr.microsoft.com、docker.elastic.co 等;免费版仅支持 docker.io。
当返回 402 Payment Required 错误时,表示流量已耗尽,需要充值流量包以恢复服务。
通常由 Docker 版本过低导致,需要升级到 20.x 或更高版本以支持 V2 协议。
先检查 Docker 版本,版本过低则升级;版本正常则验证镜像信息是否正确。
使用 docker tag 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务