在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:accetto/ubuntu-vnc-xfce-firefox-plus开源软件地址:https://github.com/accetto/ubuntu-vnc-xfce-firefox-plus开源编程语言:Dockerfile 100.0%开源软件介绍:Headless Ubuntu/Xfce container with VNC/noVNC and configurable Firefoxaccetto/ubuntu-vnc-xfce-firefox-plusDocker Hub - Git Hub - Changelog - Wiki Attention! The repository is retired and archived. It will not be developed any further and the related images on Docker Hub will not be rebuilt any more. They will phase out and they will be deleted after becoming too old. Please use the newer third generation (G3) repository accetto/ubuntu-vnc-xfce-g3 and the related images on Docker Hub instead. If you still need images based on 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 nss_wrapper, you can also use my newer image accetto/xubuntu-vnc-novnc-firefox, which is a streamlined version of this image (image hierarchy). If you also don't need noVNC, you can use even a slimmer image accetto/xubuntu-vnc-firefox, which is a member of another growing family of application images (image hierarchy). The newer images include also sudo command. 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 ( Attention: Resources for building images with default Firefox installation without configuration support can be found in its own GitHub repository ubuntu-vnc-xfce-firefox. Resources for building base images are in the GitHub repository accetto/ubuntu-vnc-xfce. This repository contains resources for building a Docker image based on Ubuntu with Xfce desktop environment, VNC/noVNC servers for headless use and the current Firefox web browser with pre-configuration support. The image 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. Containers created from this image make perfect light-weight web browsers. They can be thrown away easily and replaced quickly, improving browsing privacy. They run under a non-root user by default, improving browsing security. They make also excellent long-term browsers, because the preferences and profiles can be pre-configured and stored on volumes that survive container destruction. There are two ways of customization. Firstly, it's possible to force Firefox preferences by modifying the provided user.js file. Secondly, it's possible to use a complete Firefox profile, previously created on a volume. The HOWTO page in Wiki describes it in more details. Frequently used preferences and profiles can be also embedded into new customized images, built by the user. The ready-to-use Dockerfiles are already provided (see below). The HOWTO page in Wiki describes how to build such images. 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 is based on the accetto/ubuntu-vnc-xfce image, just adding the Firefox browser and the resources for its customization. The image inherits the following components from its base image:
Please note that Firefox 67 has changed default profile handling and therefore the pre-created folder The following desktop launchers have been added for your convenience:
Running containers in background is the primary scenario this image has been developed for. However, running in foreground can be useful in many cases. See the description below for examples of using the containers both ways. The image is regularly maintained and rebuilt. The history of notable changes is documented in CHANGELOG. Image set
PortsFollowing TCP ports are exposed:
The default VNC user password is headless. VolumesThe containers do not create or use any external volumes by default. However, the following folders make good mounting points:
The following mounting point is specific to Firefox:
Both named volumes and bind mounts can be used. More about volumes can be found in Docker documentation (e.g. Manage data in Docker). Version stickerVersion 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 The script is deployed into the startup folder, which is defined by the environment variable 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 If it is called with the argument Examples can be found in Wiki. Firefox multi-processFirefox 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 For some time I've maintained also 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. Setting shared memory sizeInstability 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: docker run -d -P --shm-size=256m accetto/xubuntu-vnc-xfce-firefox-plus You can check the current shared memory size by executing the following command inside the container: df -h /dev/shm Running containers in background (detached)Created containers will run under the non-root user headless:headless by default. The following container will listen on automatically selected TCP ports of the host computer:
The following container will listen on the host's TCP ports 25901 (VNC) and 26901 (noVNC):
The following container wil create or re-use the local named volume my_Downloads mounted as
or using the newer syntax with --mount flag:
More usage examples can be found in Wiki (section HOWTO). Running containers in foreground (interactively)The image supports the following container start-up options: The following container will print out the help and then it'll remove itself:
Excerpt from the output, which describes the other options:
It should be noticed, that the In the first terminal window on the host computer, create a new container named foo:
In the second terminal window on the host computer, execute the shell inside the foo container:
Using headless containersThere are two ways, how to use the created headless containers. Note that the default VNC user password is headless. Over VNCTo be able to use the containers over VNC, a VNC Viewer is needed (e.g. TigerVNC or TightVNC). The VNC Viewer should connect to the host running the container, pointing to the host's TCP port mapped to the container's TCP port 5901. For example, if the container has been created on the host called Over noVNCTo 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 the host's TCP port mapped to the container's TCP port 6901. However, the containers offer two noVNC clients - lite and full. The connection URL differs slightly in both cases. To make it easier, a simple startup page is implemented. If the container have been created on the host called The startup page will show two hyperlinks pointing to the both noVNC clients:
It's also possible to provide the password through the links:
IssuesIf 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. CreditsCredit goes to all the countless people and companies who contribute to open source community and make so many dreamy things real. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论