forked from vital987/chrome-novnc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
58 changed files
with
173 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,8 @@ | |
.gitattributes | ||
.gitignore | ||
.github/ | ||
|
||
app.json | ||
heroku.yml | ||
Makefile | ||
Dockerfile.heroku | ||
CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.vscode/ | ||
.vagrant* | ||
bin | ||
docker/docker | ||
.*.swp | ||
a.out | ||
*.orig | ||
build_src | ||
.flymake* | ||
.idea | ||
.DS_Store | ||
docs/_build | ||
docs/_static | ||
docs/_templates | ||
.gopath/ | ||
.dotcloud | ||
*.test | ||
bundles/ | ||
.hg/ | ||
vendor/pkg/ | ||
pyenv | ||
Vagrantfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Changelog | ||
|
||
## 0.12.0 - 2024-05-02 | ||
|
||
### Added | ||
|
||
- CHANGELOG.md | ||
- .gitignore | ||
- Makefile | ||
- docker-compose.yml | ||
- --disable-gpu flag to chrome | ||
- missing python requests module required for self-ping.py ([#7](https://github.com/vital987/chrome-novnc/issues/7) fix) | ||
- VNC_SHARED to app.json | ||
|
||
### Changed | ||
|
||
- base distro to alpine | ||
- package names for alpine compatibility | ||
- chromium download source to alpine repo | ||
- README.md | ||
- rootfs -> assets | ||
|
||
### Fixed | ||
|
||
- issue [#7](https://github.com/vital987/chrome-novnc/issues/7) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,42 @@ | ||
FROM ubuntu:22.04 | ||
FROM alpine:3.19.1 | ||
|
||
LABEL AboutImage "Ubuntu22.04_Chromium_NoVNC" | ||
LABEL AboutImage "Alpine_Chromium_NoVNC" | ||
|
||
LABEL Maintainer "Apoorv Vyavahare <[email protected]>" | ||
|
||
ARG DEBIAN_FRONTEND=noninteractive | ||
LABEL Maintainer "Apurv Vyavahare <[email protected]>" | ||
|
||
#VNC Server Password | ||
ENV VNC_PASS="samplepass" \ | ||
ENV VNC_PASS="CHANGE_IT" \ | ||
#VNC Server Title(w/o spaces) | ||
VNC_TITLE="Chromium" \ | ||
#VNC Resolution(720p is preferable) | ||
VNC_RESOLUTION="1280x720" \ | ||
#VNC Shared Mode (0=off, 1=on) | ||
VNC_SHARED=0 \ | ||
#VNC Shared Mode | ||
VNC_SHARED=false \ | ||
#Local Display Server Port | ||
DISPLAY=:0 \ | ||
#NoVNC Port | ||
NOVNC_PORT=$PORT \ | ||
PORT=8080 \ | ||
#Heroku No-Sleep Mode | ||
NO_SLEEP=false \ | ||
#Locale | ||
LANG=en_US.UTF-8 \ | ||
LANGUAGE=en_US.UTF-8 \ | ||
LC_ALL=C.UTF-8 \ | ||
TZ="Asia/Kolkata" | ||
|
||
COPY rootfs/ / | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
COPY assets/ / | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y tzdata ca-certificates supervisor curl wget python3 python3-pip sed unzip xvfb x11vnc websockify openbox libnss3 libgbm-dev libasound2 fonts-droid-fallback && \ | ||
#Chromium | ||
wget https://www.googleapis.com/download/storage/v1/b/chromium-browser-snapshots/o/Linux_x64%2F1235467%2Fchrome-linux.zip?alt=media -O /tmp/chrome-linux.zip && \ | ||
unzip /tmp/chrome-linux.zip -d /opt && \ | ||
#noVNC | ||
openssl req -new -newkey rsa:4096 -days 36500 -nodes -x509 -subj "/C=IN/ST=Maharastra/L=Private/O=Dis/CN=www.google.com" -keyout /etc/ssl/novnc.key -out /etc/ssl/novnc.cert && \ | ||
#TimeZone | ||
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && \ | ||
RUN apk update && \ | ||
apk add --no-cache tzdata ca-certificates supervisor curl wget openssl bash python3 py3-requests sed unzip xvfb x11vnc websockify openbox chromium nss alsa-lib font-noto && \ | ||
# noVNC SSL certificate | ||
openssl req -new -newkey rsa:4096 -days 36500 -nodes -x509 -subj "/C=IN/O=Dis/CN=www.google.com" -keyout /etc/ssl/novnc.key -out /etc/ssl/novnc.cert > /dev/null 2>&1 && \ | ||
# TimeZone | ||
cp /usr/share/zoneinfo/$TZ /etc/localtime && \ | ||
echo $TZ > /etc/timezone && \ | ||
#Wipe Temp Files | ||
rm -rf /var/lib/apt/lists/* && \ | ||
apt-get remove -y wget python3-pip unzip && \ | ||
apt-get -y autoremove && \ | ||
apt-get clean && \ | ||
rm -rf /tmp/* | ||
|
||
# Wipe Temp Files | ||
apk del build-base curl wget unzip tzdata openssl && \ | ||
rm -rf /var/cache/apk/* /tmp/* | ||
ENTRYPOINT ["supervisord", "-l", "/var/log/supervisord.log", "-c"] | ||
|
||
CMD ["/config/supervisord.conf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
USR=vital987 | ||
NAME=chrome-novnc | ||
TAG=latest | ||
IMG=${USR}/${NAME}:${TAG} | ||
|
||
build: clean | ||
docker build --tag ${IMG} --no-cache . | ||
|
||
up: | ||
docker-compose up | ||
|
||
down: | ||
docker-compose down | ||
|
||
clean: | ||
docker stop ${IMG} 2>/dev/null || : | ||
docker rm ${IMG} 2>/dev/null || : | ||
docker rmi ${IMG} 2>/dev/null || : |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,29 @@ | ||
# Chromium with NoVNC | ||
|
||
## Warning | ||
This project runs Chromium directly as the root user without sandboxing. Avoid deploying it in production environments. | ||
## Installation | ||
- ### Heroku | ||
[![Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/vital987/chrome-novnc) | ||
|
||
## Heroku installation | ||
[![Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/vital987/chrome-novnc) | ||
- ### Manual | ||
- ```sh | ||
HOST_PORT=8080 VNC_PASS=CHANGE_IT docker-compose up -d | ||
``` | ||
- ```sh | ||
docker run \ | ||
--name chrome-novnc \ | ||
-e PORT=8080 \ | ||
-p 8080:8080 \ | ||
-e VNC_PASS=CHANGE_IT \ | ||
vital987/chrome-novnc:latest | ||
``` | ||
|
||
## Manual installation | ||
```bash | ||
docker run \ | ||
--name chrome-novnc \ | ||
-e PORT=9870 \ | ||
-p 9870:9870 \ | ||
-e VNC_PASS=TestPass987 \ | ||
vital987/chrome-novnc:latest | ||
``` | ||
|
||
## Environment variables: | ||
| PORT | NoVNC HTTPS Port (Default: 9870) | | ||
|:--------------:|:--------------------------------------------------------------:| | ||
| VNC_PASS | VNC Password (Default: samplepass) | | ||
| VNC_TITLE | VNC Session Title (Default: Chromium) | | ||
| VNC_RESOLUTION | VNC Resolution (Default: 1280x720) | | ||
| APP_NAME | Name of the app (Heroku specific) | | ||
| NO_SLEEP | Prevent app from sleeping (Heroku specific, default: disabled) | | ||
## Environment variables: | ||
|VARIABLE |DESCRIPTION |DEFAULT VALUE | | ||
|-------------:|:------------------------|:-------------:| | ||
|VNC_PASS |VNC Password |CHANGE_IT | | ||
|VNC_TITLE |VNC Session Title |Chromium | | ||
|VNC_SHARED |VNC Shared Mode |false | | ||
|VNC_RESOLUTION|VNC Resolution |1280x720 | | ||
|PORT |NoVNC HTTPS Port |Heroku specific| | ||
|APP_NAME |Name of the app |Heroku specific| | ||
|NO_SLEEP |Prevent app from sleeping|Heroku specific| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,47 @@ | ||
{ | ||
"name":"Chromium-NoVNC", | ||
"description":"Chromium via NoVNC", | ||
"repository":"https://github.com/vital987/chromium-novnc.git", | ||
"logo":"https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Google_Chrome_icon_%28September_2014%29.svg/2048px-Google_Chrome_icon_%28September_2014%29.svg.png", | ||
"keywords":[ | ||
"name": "Chromium-NoVNC", | ||
"description": "Chromium access with NoVNC", | ||
"repository": "https://github.com/vital987/chrome-novnc.git", | ||
"logo": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a5/Google_Chrome_icon_%28September_2014%29.svg/2048px-Google_Chrome_icon_%28September_2014%29.svg.png", | ||
"keywords": [ | ||
"docker", | ||
"browser", | ||
"chrome", | ||
"chrome", | ||
"heroku", | ||
"novnc", | ||
"vnc", | ||
"firefox" | ||
], | ||
"stack":"container", | ||
"env":{ | ||
"APP_NAME":{ | ||
"description":"Name of the app, same as mentioned above.", | ||
"required":true | ||
"stack": "container", | ||
"env": { | ||
"APP_NAME": { | ||
"description": "Heroku application name", | ||
"required": true | ||
}, | ||
"VNC_TITLE": { | ||
"description": "VNC session title", | ||
"value": "Chromium", | ||
"required": true | ||
}, | ||
"VNC_TITLE":{ | ||
"description":"VNC Session Title, w/o spaces.", | ||
"value":"Chromium", | ||
"required":true | ||
"VNC_PASS": { | ||
"description": "VNC server password (8+ characters)", | ||
"required": true | ||
}, | ||
"VNC_PASS":{ | ||
"description":"VNC server password w/o spaces.", | ||
"required":true | ||
"VNC_RESOLUTION": { | ||
"description": "VNC server resolution in WidthxHeight format (720p preferred)", | ||
"value": "1280x720", | ||
"required": true | ||
}, | ||
"VNC_RESOLUTION":{ | ||
"description":"VNC Server Resolution in WxH, 720p is preferrable.", | ||
"value":"1280x720", | ||
"required":true | ||
"VNC_SHARED": { | ||
"description": "Run single instance on multiple devices", | ||
"value": "false", | ||
"required": true | ||
}, | ||
"NO_SLEEP":{ | ||
"description":"Prevent app from sleeping, 1=on, 0=off", | ||
"value":"0", | ||
"required":true | ||
"NO_SLEEP": { | ||
"description": "Prevent app from sleeping", | ||
"value": "false", | ||
"required": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[program:VNC] | ||
command=bash -c 'sed -i "s/\$DESKTOP/$VNC_TITLE/g" /opt/novnc/index.html && if ((VNC_SHARED==false)); then x11vnc -storepasswd $VNC_PASS /config/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /config/.xpass -geometry $VNC_RESOLUTION -forever -alwaysshared -permitfiletransfer -noxrecord -noxfixes -noxdamage -dpms -bg -desktop $VNC_TITLE; else x11vnc -storepasswd $VNC_PASS /config/.xpass && x11vnc -usepw -rfbport 5900 -rfbauth /config/.xpass -geometry $VNC_RESOLUTION -forever -shared -alwaysshared -permitfiletransfer -bg -desktop $VNC_TITLE; fi' | ||
startsecs=0 | ||
autorestart=unexpected | ||
stderr_logfile=/var/log/x11vnc.stderr.log | ||
priority=3 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[program:Chromium] | ||
command=bash -c 'chromium --no-sandbox --test-type --disable-dev-shm-usage --disable-gpu --start-maximized' | ||
priority=5 | ||
autorestart=true | ||
stderr_logfile=/var/log/chromium.err.log |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
version: '3.4' | ||
|
||
services: | ||
chrome-novnc: | ||
container_name: chrome-novnc | ||
environment: | ||
- VNC_PASS=${VNC_PASS-CHANGE_IT} | ||
- VNC_TITLE=${VNC_TITLE-Chromium} | ||
- VNC_SHARED=${VNC_SHARED-false} | ||
- VNC_RESOLUTION=${VNC_RESOLUTION-1280x720} | ||
- PORT=8080 | ||
image: vital987/chrome-novnc:latest | ||
ports: | ||
- "${HOST_PORT-8080}:8080/tcp" | ||
restart: always |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.