# Docker container for Chromium
<img src="https://repository-images.githubusercontent.com/265011647/d609fa80-bad5-11ea-8898-a68379ea5d9f">
This is a Docker container for Chromium.
The GUI of the application is accessed through a modern web browser (no installation or configuration needed on client side) or via any VNC client.
---
Big thanks to @jlesage. This image is based off https://github.com/jlesage/docker-firefox
___

---
## Table of Content
* [Docker container for Chromium](#docker-container-for-chromium)
* [Table of Content](#table-of-content)
* [Quick Start](#quick-start)
* [Usage](#usage)
* [Environment Variables](#environment-variables)
* [Data Volumes](#data-volumes)
* [Ports](#ports)
* [Changing Parameters of a Running Container](#changing-parameters-of-a-running-container)
* [Docker Compose File](#docker-compose-file)
* [Docker Image Update](#docker-image-update)
* [Synology](#synology)
* [unRAID](#unraid)
* [User/Group IDs](#usergroup-ids)
* [Accessing the GUI](#accessing-the-gui)
* [Security](#security)
* [SSVNC](#ssvnc)
* [Certificates](#certificates)
* [VNC Password](#vnc-password)
* [Reverse Proxy](#reverse-proxy)
* [Routing Based on Hostname](#routing-based-on-hostname)
* [Routing Based on URL Path](#routing-based-on-url-path)
* [Shell Access](#shell-access)
* [Increasing Shared Memory Size](#increasing-shared-memory-size)
* [Sound Support](#sound-support)
* [Setting Chromium Preferences Via Environment Variables](#setting-chromium-preferences-via-environment-variables)
* [Troubleshooting](#troubleshooting)
* [Crashes](#crashes)
* [Support or Contact](#support-or-contact)
## Quick Start
**NOTE**: The Docker command provided in this quick start is given as an example
and parameters should be adjusted to your need.
Launch the Chromium docker container with the following command:
```
docker run -d \
--name=chromium \
-p 5800:5800 \
-v /docker/appdata/chromium:/config:rw \
--shm-size 2g \
overclockedllama/docker-chromium
```
Where:
- `/docker/appdata/chromium`: This is where the application stores its configuration, log and any files needing persistency.
Browse to `http://your-host-ip:5800` to access the Chromium GUI.
## Usage
```
docker run [-d] \
--name=chromium \
[-e <VARIABLE_NAME>=<VALUE>]... \
[-v <HOST_DIR>:<CONTAINER_DIR>[:PERMISSIONS]]... \
[-p <HOST_PORT>:<CONTAINER_PORT>]... \
--shm-size VALUE \
overclockedllama/docker-chromium
```
| Parameter | Description |
|-----------|-------------|
| -d | Run the container in background. If not set, the container runs in foreground. |
| -e | Pass an environment variable to the container. See the [Environment Variables](#environment-variables) section for more details. |
| -v | Set a volume mapping (allows to share a folder/file between the host and the container). See the [Data Volumes](#data-volumes) section for more details. |
| -p | Set a network port mapping (exposes an internal container port to the host). See the [Ports](#ports) section for more details. |
| --shm-size | Set the size of `/dev/shm` to `VALUE`. The format of `VALUE` is `<number><unit>`, where `number` must be greater than `0` and `unit` can be `b` (bytes), `k` (kilobytes), `m` (megabytes), or `g` (gigabytes). **NOTE**: To avoid crashes, it is recommended to set this value to `2g`. |
### Environment Variables
To customize some properties of the container, the following environment
variables can be passed via the `-e` parameter (one for each variable). Value
of this parameter has the format `<VARIABLE_NAME>=<VALUE>`.
| Variable | Description | Default |
|----------------|----------------------------------------------|---------|
|`USER_ID`| ID of the user the application runs as. See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` |
|`GROUP_ID`| ID of the group the application runs as. See [User/Group IDs](#usergroup-ids) to better understand when this should be set. | `1000` |
|`SUP_GROUP_IDS`| Comma-separated list of supplementary group IDs of the application. | (unset) |
|`UMASK`| Mask that controls how file permissions are set for newly created files. The value of the mask is in octal notation. By default, this variable is not set and the default umask of `022` is used, meaning that newly created files are readable by everyone, but only writable by the owner. See the following online umask calculator: http://wintelguy.com/umask-calc.pl | (unset) |
|`TZ`| [TimeZone] of the container. Timezone can also be set by mapping `/etc/localtime` between the host and the container. | `Etc/UTC` |
|`KEEP_APP_RUNNING`| When set to `1`, the application will be automatically restarted if it crashes or if user quits it. | `0` |
|`APP_NICENESS`| Priority at which the application should run. A niceness value of -20 is the highest priority and 19 is the lowest priority. By default, niceness is not set, meaning that the default niceness of 0 is used. **NOTE**: A negative niceness (priority increase) requires additional permissions. In this case, the container should be run with the docker option `--cap-add=SYS_NICE`. | (unset) |
|`CLEAN_TMP_DIR`| When set to `1`, all files in the `/tmp` directory are delete during the container startup. | `1` |
|`DISPLAY_WIDTH`| Width (in pixels) of the application's window. | `1280` |
|`DISPLAY_HEIGHT`| Height (in pixels) of the application's window. | `768` |
|`SECURE_CONNECTION`| When set to `1`, an encrypted connection is used to access the application's GUI (either via web browser or VNC client). See the [Security](#security) section for more details. | `0` |
|`VNC_PASSWORD`| Password needed to connect to the application's GUI. See the [VNC Password](#vnc-password) section for more details. | (unset) |
|`X11VNC_EXTRA_OPTS`| Extra options to pass to the x11vnc server running in the Docker container. **WARNING**: For advanced users. Do not use unless you know what you are doing. | (unset) |
|`ENABLE_CJK_FONT`| When set to `1`, open source computer font `WenQuanYi Zen Hei` is installed. This font contains a large range of Chinese/Japanese/Korean characters. | `0` |
### Data Volumes
The following table describes data volumes used by the container. The mappings
are set via the `-v` parameter. Each mapping is specified with the following
format: `<HOST_DIR>:<CONTAINER_DIR>[:PERMISSIONS]`.
| Container path | Permissions | Description |
|-----------------|-------------|-------------|
|`/config`| rw | This is where the application stores its configuration, log and any files needing persistency. |
### Ports
Here is the list of ports used by the container. They can be mapped to the host
via the `-p` parameter (one per port mapping). Each mapping is defined in the
following format: `<HOST_PORT>:<CONTAINER_PORT>`. The port number inside the
container cannot be changed, but you are free to use any port on the host side.
| Port | Mapping to host | Description |
|------|-----------------|-------------|
| 5800 | Mandatory | Port used to access the application's GUI via the web interface. |
| 5900 | Optional | Port used to access the application's GUI via the VNC protocol. Optional if no VNC client is used. |
### Changing Parameters of a Running Container
As seen, environment variables, volume mappings and port mappings are specified
while creating the container.
The following steps describe the method used to add, remove or update
parameter(s) of an existing container. The generic idea is to destroy and
re-create the container:
1. Stop the container (if it is running):
```
docker stop chromium
```
2. Remove the container:
```
docker rm c
没有合适的资源?快使用搜索试试~ 我知道了~
docker-chromium:具有Chrome桌面和Web VNC客户端的docker容器,可让您在拥有的任何服务器上运行Ch...

共23个文件
yml:5个
sh:4个
filter:2个

需积分: 50 13 下载量 31 浏览量
2021-05-11
06:20:55
上传
评论
收藏 30KB ZIP 举报
温馨提示
用于Chromium的Docker容器 这是Chromium的Docker容器。 可通过现代Web浏览器(无需在客户端上进行安装或配置)或任何VNC客户端来访问应用程序的GUI。 非常感谢@jlesage。 该图像基于 表中的内容 取消RAID 用户/组ID 访问GUI 安全 南极 证明书 VNC密码 反向代理 基于主机名的路由 基于URL路径的路由 外壳访问 增加共享内存大小 声音支持 通过环境变量设置Chromium首选项 故障排除崩溃 支持或联系 快速开始 注意:本快速入门中提供的Docker命令是作为示例提供的,应根据您的需要调整参数。 使用以下命令启动Chromium docker容器: docker run -d \ --name=chromium \ -p 5800:5800 \ -v /docker/appdata/chromium
资源详情
资源评论
资源推荐
收起资源包目录




































共 23 条
- 1





























KINSLAUGHTER
- 粉丝: 37
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 如何学好网络营销课程.doc
- 信息系统安全概述.pptx
- 基于单片机的电子密码锁的课程设计.docx
- 数据挖掘的方法有哪些?.pdf
- 汽车单片机与车载网络培训课件.pptx
- 房产项目管理实用表格工具.doc
- 卫星通信系统概述.ppt
- 模板项目管理月报.doc
- 中企动力网络营销.pptx
- 专业会计必备的应的Excel技巧【会计实务操作教程】.pptx
- 数据库原理试卷A(标准答案).doc
- 网络安全入侵检测.ppt
- 最新国家开放大学电大《营销策划案例分析》网络核心课形考网考作业及答案.pdf
- 网络营销理论培训课件.pptx
- 综合布线技术与施工模拟公司制.pptx
- 无线网络WIFI对人们生活影响的调查报告样本.docx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制

评论0