accetto/xubuntu-vnc-novnc-firefoxDocker Hub - Git Hub - Changelog - Wiki - Hierarchy
WARNING about images with Firefox
Starting from the release 20.10.1, there is no single-process Firefox image and the multi-process mode is always enabled. Be aware, that multi-process requires larger shared memory (/dev/shm). At least 256MB is recommended. Please check the Firefox multi-process page in Wiki for more information and the instructions, how to set the shared memory size in different scenarios.
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.
This is the second generation (G2) 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 (G2v2) brings some improvements, mostly in the building pipeline and supporting scripts.
If you want the 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.
The main image is a streamlined and simplified version of my other image accetto/ubuntu-vnc-xfce-firefox-plus. The applicable plus features have been re-implemented because Firefox v67 handles user profiles differently.
The images are part of the growing image hierarchy and they are based on accetto/xubuntu-vnc-novnc. They inherit all the features and therefore not the whole description will be repeated here.
The latest image inherits among others
.deb packages resolving and installing their dependencies (Ubuntu distribution)and adds
The history of notable changes is documented in the CHANGELOG.
The following image tags are regularly maintained and rebuilt:
latest is based on accetto/xubuntu-vnc-novnc:latest and it includes also the plus features
The Git Hub repository contains several Dockerfiles that can be used to build the images.
Dockerfile.firefox
This is the main Dockerfile for building the latest image tag based on the accetto/xubuntu-vnc-novnc:latest tag by default.
However, by providing the BASETAG build argument it is possible to build images based on other base tags, for example accetto/xubuntu-vnc-novnc:lab.
This Docker file will include also the plus features described below.
Dockerfile.firefox.default
This Dockerfile is for building the default image tag, which is also based on the accetto/xubuntu-vnc-novnc:latest, but it does not include the plus features.
Dockerfile.firefox.myown can be used for building images with your own Firefox preferences already built-in
Following TCP ports are exposed:
The containers do not create or use any external volumes by default. However, the following folders make good mounting points: /home/headless/Documents/, /home/headless/Downloads/, /home/headless/Pictures/, /home/headless/Public/
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).
Containers created from these images run under the non-root default application user (headless, 1001:0). However, the sudo command allows user elevation. For more description check the base image accetto/xubuntu-vnc-novnc or Wiki.
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.
There are two ways, how to use the created headless containers. Please refer to the base image accetto/xubuntu-vnc-novnc to learn about them.
Note that the default VNC user password is headless.
Firefox multi-process (also known as Electrolysis or just E10S) can cause heavy crashing in Docker containers if there is not enough shared memory (Gah. Your tab just crashed.).
In Firefox versions till 76.0.1 it has been possible to disable multi-process by setting the environment variable MOZ_FORCE_DISABLE_E10S. However, in Firefox 77.0.1 it has caused ugly scrambling of almost all web pages, because they were not decompressed.
Mozilla has fixed the problem in the next release, but they warned about not supporting the switch in future. That is why I've decided, that the mainstream image tagged as latest will use multi-process by default, even if it requires larger shared memory. On the positive side, performance should be higher and Internet browsing should be sand-boxed.
For some time I've maintained also singleprocess images intended for scenarios, where increasing the shared memory size is not possible or not wanted. However, by Firefox 81.0 I've noticed, that the environment variable MOZ_FORCE_DISABLE_E10S has no effect any more. Since then all images run Firefox in multi-process mode.
Please check the Wiki page Firefox multi-process for more information and the instructions, how the shared memory size can be set in different scenarios.
Instability of multi-process Firefox is caused by setting the shared memory size too low. Docker assigns only 64MB by default. Testing on my computers has shown, that using at least 256MB completely eliminates the problem. However, it could be different on your system.
The Wiki page Firefox multi-process describes several ways, how to increase the shared memory size. It's really simple, if you need it for a single container started from the command line.
For example, the following container will have its shared memory size set to 256MB:
bashdocker run -d -P --shm-size=256m accetto/xubuntu-vnc-novnc-firefox
You can check the current shared memory size by executing the following command inside the container:
bashdf -h /dev/shm
Firefox browser supports pre-configuration of user preferences.
Users can enforce their personal browser preferences if they put them into the user.js file and then copy it into the Firefox profile folder. The provided plus features make it really easy.
There is the /home/headless/firefox.plus folder containing the user.js file and the helper utility copy_firefox_user_preferences.sh. It will copy the user.js file into one or more existing Firefox profiles. The utility is easy to use, because it is interactive and it will also display the help, if started with the -h or --help argument.
To make it even more convenient, there are also desktop launchers for the utility and for the Firefox Profile Manager.
Recommended procedure for taking advantage of the plus features is:
Start the Firefox Profile Manager using the desktop launcher FF Profile Manager. Create a new Firefox profile if there is none or you want to add one more. Wait until the profile is created and then start Firefox with it. Starting Firefox is required to create the actual profile content.
Hint: You can also check the Work offline check-box before creating the profile.
The Firefox profiles are created inside the /home/headless/.mozilla/firefox folder by default. Note that the .mozilla folder is hidden.
Close the Profile Manager by pushing the Exit button.
Put your personal Firefox preferences into the user.js file which is in the /home/headless/firefox.plusfolder. Check the Firefox documentation (e.g. Firefox preferences) for more information about the syntax.
Hint: There is also another way. You can first start Firefox, configure it and then copy the content of the prefs.js file from the Firefox profile folder into the user.js file. Then you can check the content and to keep only the preferences you really want to enforce. It's not a quick task, but you have to do it only once or until you need an update.
Start the helper utility using the desktop launcher Copy FF Preferences. The utility will allow you to copy the user.js file to any of the existing Firefox profiles.
Hint: You preferences will be enforced until you delete the user.js file from the Firefox profile folder.
It is also very easy to build customized images with pre-filled user.js files. The provided Dockerfile.firefox.myown show how to do it. The build will take just seconds.
If you have found a problem or you just have a question, please check the Issues and the 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.
Credit 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 命令为镜像打上新标签,去掉域名前缀,使镜像名称更简洁。
来自真实用户的反馈,见证轩辕镜像的优质服务