├── .dockerignore ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug.md │ ├── feature.md │ └── question.md ├── PULL_REQUEST_TEMPLATE │ ├── bugfix.md │ ├── enhancement.md │ └── feature.md ├── dependabot.yml └── workflows │ ├── nightly.yml │ └── releases.yml ├── .gitignore ├── .pics ├── os_build_and_run.png ├── os_build_and_run_deployment.png ├── os_run_only.png └── vnc_container_view.png ├── Dockerfile.debian-icewm-vnc ├── Dockerfile.debian-xfce-vnc ├── Dockerfile.rocky-icewm-vnc ├── Dockerfile.rocky-xfce-vnc ├── LICENSE ├── Makefile ├── README.md ├── changelog.md ├── how-to-release.md ├── kubernetes ├── README.md └── kubernetes.headless-vnc.example.deployment.yaml ├── openshift ├── README.md ├── openshift.headless-vnc.buildandrun.yaml └── openshift.headless-vnc.run.yaml ├── src ├── common │ ├── install │ │ ├── firefox.sh │ │ ├── no_vnc.sh │ │ └── set_user_permission.sh │ ├── scripts │ │ ├── chrome-init.sh │ │ ├── generate_container_user │ │ └── vnc_startup.sh │ └── xfce │ │ ├── .config │ │ ├── bg_image.png │ │ └── xfce4 │ │ │ └── xfconf │ │ │ └── xfce-perchannel-xml │ │ │ ├── xfce4-desktop.xml │ │ │ ├── xfce4-keyboard-shortcuts.xml │ │ │ ├── xfce4-panel.xml │ │ │ ├── xfwm4.xml │ │ │ └── xsettings.xml │ │ ├── Desktop │ │ ├── chromium-browser.desktop │ │ └── firefox.desktop │ │ └── wm_startup.sh ├── debian │ ├── icewm │ │ ├── .icewm │ │ │ ├── menu │ │ │ ├── preferences │ │ │ ├── theme │ │ │ └── toolbar │ │ └── wm_startup.sh │ └── install │ │ ├── chrome.sh │ │ ├── icewm_ui.sh │ │ ├── install_custom_fonts.sh │ │ ├── libnss_wrapper.sh │ │ ├── tigervnc.sh │ │ ├── tools.sh │ │ └── xfce_ui.sh └── rocky │ ├── icewm │ ├── .icewm │ │ ├── menu │ │ ├── preferences │ │ ├── theme │ │ └── toolbar │ └── wm_startup.sh │ └── install │ ├── chrome.sh │ ├── icewm_ui.sh │ ├── libnss_wrapper.sh │ ├── rocky.sh │ ├── tigervnc.sh │ ├── tools.sh │ └── xfce_ui.sh ├── t ├── Makefile ├── docker-compose.yml └── test.t └── update_refreshed_at.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !src 3 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set default behaviour, in case users don't have core.autocrlf set. 2 | * text=auto 3 | 4 | # Explicitly declare text files we want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.c text 7 | *.h text 8 | *.sah text 9 | *.suite text 10 | *.inc text 11 | *.js text 12 | *.json text 13 | 14 | # Declare files that will always have CRLF line endings on checkout. 15 | *.sln text eol=crlf 16 | 17 | # Denote all files that are truly binary and should not be modified. 18 | *.png binary 19 | *.jpg binary 20 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a bug report to help us enhance our images 4 | --- 5 | 6 | **Image** 7 | 8 | **Tag** 9 | 10 | **Short overview** 11 | 12 | **Detailed error description** 13 | 14 | **Additional content** 15 | > Please provide any (mandatory) additional data to reproduce the error (custom Dockerfiles etc.) -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Open a feature request 4 | --- 5 | 6 | **Short overview** 7 | 8 | **Use case** 9 | 10 | **Detailed feature description** 11 | 12 | **Additional content** 13 | > Please provide any (mandatory) additional data for your desired feature 14 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Question 3 | about: File a request to resolve open questions 4 | --- 5 | 6 | **Image** 7 | 8 | **Tag** 9 | 10 | **Short summary** 11 | 12 | **Detailed question** -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/bugfix.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bugfix 3 | about: Request to merge a bugfix to our existing images 4 | --- 5 | 6 | **Short summary** 7 | 8 | **Detailed description (motivation, use-case etc.)** 9 | 10 | **Screenshots (if appropriate)** 11 | 12 | **Checklist** 13 | 14 | - [ ] My change requires a change to the documentation. 15 | - [ ] I have updated the documentation accordingly. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/enhancement.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Enhancement 3 | about: Request to merge an enhancement to our existing images 4 | --- 5 | 6 | **Short summary** 7 | 8 | **Detailed description (motivation, use-case etc.)** 9 | 10 | **Screenshots (if appropriate)** 11 | 12 | **Checklist** 13 | 14 | - [ ] My change requires a change to the documentation. 15 | - [ ] I have updated the documentation accordingly. -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/feature.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature 3 | about: Request to merge a new feature 4 | --- 5 | 6 | **Short summary** 7 | 8 | **Detailed description (motivation, use-case etc.)** 9 | 10 | **Screenshots (if appropriate)** 11 | 12 | **Checklist** 13 | 14 | - [ ] My change requires a change to the documentation. 15 | - [ ] I have updated the documentation accordingly. 16 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: github-actions 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | time: "04:00" 8 | pull-request-branch-name: 9 | separator: "-" 10 | open-pull-requests-limit: 10 11 | -------------------------------------------------------------------------------- /.github/workflows/nightly.yml: -------------------------------------------------------------------------------- 1 | name: Docker nightly 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | tags-ignore: 8 | - '*' 9 | workflow_dispatch: 10 | 11 | jobs: 12 | build-and-test: 13 | name: build and test images 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Checkout code 17 | uses: actions/checkout@v4 18 | - name: install test dependencies 19 | run: | 20 | sudo apt-get update 21 | sudo apt-get install -y curl perl netcat-traditional libtest-simple-perl libyaml-perl 22 | - name: run test 23 | run: make test 24 | - name: run clean 25 | run: make clean 26 | 27 | push_to_registries: 28 | name: Push Docker image to github and dockerhub 29 | runs-on: ubuntu-latest 30 | permissions: 31 | packages: write 32 | contents: read 33 | strategy: 34 | fail-fast: false 35 | matrix: 36 | target: 37 | - rocky-icewm-vnc 38 | - rocky-xfce-vnc 39 | - debian-icewm-vnc 40 | - debian-xfce-vnc 41 | steps: 42 | - name: Check out the repo 43 | uses: actions/checkout@v4 44 | - name: Set up QEMU 45 | uses: docker/setup-qemu-action@v3 46 | - name: Set up Docker Buildx 47 | uses: docker/setup-buildx-action@v3 48 | - name: Log in to Docker Hub 49 | uses: docker/login-action@v3 50 | with: 51 | username: ${{ secrets.DOCKER_USERNAME }} 52 | password: ${{ secrets.DOCKER_PASSWORD }} 53 | - name: Build/Push to Docker Hub 54 | uses: docker/build-push-action@v6 55 | with: 56 | push: true 57 | file: Dockerfile.${{ matrix.target }} 58 | tags: consol/${{ matrix.target }}:nightly 59 | platforms: linux/amd64,linux/arm64 60 | - name: Log in to GitHub Docker Registry 61 | uses: docker/login-action@v3 62 | with: 63 | registry: ghcr.io 64 | username: ${{ secrets.REGISTRY_USER }} 65 | password: ${{ secrets.PTA }} 66 | - name: Build/Push to github.com 67 | uses: docker/build-push-action@v6 68 | with: 69 | push: true 70 | file: Dockerfile.${{ matrix.target }} 71 | tags: ghcr.io/consol/docker-headless-vnc-container/${{ matrix.target }}:nightly 72 | platforms: linux/amd64,linux/arm64 73 | -------------------------------------------------------------------------------- /.github/workflows/releases.yml: -------------------------------------------------------------------------------- 1 | name: Docker releases 2 | 3 | on: 4 | push: 5 | branches: 6 | - 'v*' 7 | tags-ignore: 8 | - '*' 9 | 10 | jobs: 11 | build-and-test: 12 | name: build and test images 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Checkout code 16 | uses: actions/checkout@v4 17 | - name: install test dependencies 18 | run: | 19 | sudo apt-get update 20 | sudo apt-get install -y curl perl netcat-traditional libtest-simple-perl libyaml-perl 21 | - name: run test 22 | run: make test 23 | - name: run clean 24 | run: make clean 25 | 26 | push_to_registries: 27 | name: Push Docker image to github and dockerhub 28 | runs-on: ubuntu-latest 29 | permissions: 30 | packages: write 31 | contents: read 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | target: 36 | - rocky-icewm-vnc 37 | - rocky-xfce-vnc 38 | - debian-icewm-vnc 39 | - debian-xfce-vnc 40 | steps: 41 | - name: Check out the repo 42 | uses: actions/checkout@v4 43 | - name: Set up QEMU 44 | uses: docker/setup-qemu-action@v3 45 | - name: Set up Docker Buildx 46 | uses: docker/setup-buildx-action@v3 47 | - uses: nelonoel/branch-name@v1.0.1 48 | - name: Log in to Docker Hub 49 | uses: docker/login-action@v3 50 | with: 51 | username: ${{ secrets.DOCKER_USERNAME }} 52 | password: ${{ secrets.DOCKER_PASSWORD }} 53 | - name: Push to Docker Hub 54 | uses: docker/build-push-action@v6 55 | with: 56 | push: true 57 | file: Dockerfile.${{ matrix.target }} 58 | build-args: OMD_VERSION=${{ env.BRANCH_NAME }} 59 | tags: | 60 | consol/${{ matrix.target }}:${{ env.BRANCH_NAME }} 61 | consol/${{ matrix.target }}:latest 62 | platforms: linux/amd64,linux/arm64 63 | - name: Log in to GitHub Docker Registry 64 | uses: docker/login-action@v3 65 | with: 66 | registry: ghcr.io 67 | username: ${{ secrets.REGISTRY_USER }} 68 | password: ${{ secrets.PTA }} 69 | - name: Build/Push to github.com 70 | uses: docker/build-push-action@v6 71 | with: 72 | push: true 73 | file: Dockerfile.${{ matrix.target }} 74 | tags: | 75 | ghcr.io/consol/docker-headless-vnc-container/${{ matrix.target }}:${{ env.BRANCH_NAME }} 76 | ghcr.io/consol/docker-headless-vnc-container/${{ matrix.target }}:latest 77 | platforms: linux/amd64,linux/arm64 78 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target 2 | .idea 3 | *.iml 4 | *.log -------------------------------------------------------------------------------- /.pics/os_build_and_run.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ConSol/docker-headless-vnc-container/ae28fa8ad10f93e19ab11134bb5721a2efabf8b2/.pics/os_build_and_run.png -------------------------------------------------------------------------------- /.pics/os_build_and_run_deployment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ConSol/docker-headless-vnc-container/ae28fa8ad10f93e19ab11134bb5721a2efabf8b2/.pics/os_build_and_run_deployment.png -------------------------------------------------------------------------------- /.pics/os_run_only.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ConSol/docker-headless-vnc-container/ae28fa8ad10f93e19ab11134bb5721a2efabf8b2/.pics/os_run_only.png -------------------------------------------------------------------------------- /.pics/vnc_container_view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ConSol/docker-headless-vnc-container/ae28fa8ad10f93e19ab11134bb5721a2efabf8b2/.pics/vnc_container_view.png -------------------------------------------------------------------------------- /Dockerfile.debian-icewm-vnc: -------------------------------------------------------------------------------- 1 | # This Dockerfile is used to build an headles vnc image based on Debian 2 | 3 | FROM debian:12 4 | 5 | LABEL maintainer="Sven Nierlein sven@consol.de" 6 | ENV REFRESHED_AT=2024-08-28 7 | 8 | LABEL io.k8s.description="Headless VNC Container with IceWM window manager, firefox and chromium" \ 9 | io.k8s.display-name="Headless VNC Container based on Debian" \ 10 | io.openshift.expose-services="6901:http,5901:xvnc" \ 11 | io.openshift.tags="vnc, debian, icewm" \ 12 | io.openshift.non-scalable=true 13 | 14 | ## Connection ports for controlling the UI: 15 | # VNC port:5901 16 | # noVNC webport, connect via http://IP:6901/?password=vncpassword 17 | ENV DISPLAY=:1 \ 18 | VNC_PORT=5901 \ 19 | NO_VNC_PORT=6901 20 | EXPOSE $VNC_PORT $NO_VNC_PORT 21 | 22 | ### Envrionment config 23 | ENV HOME=/headless \ 24 | TERM=xterm \ 25 | STARTUPDIR=/dockerstartup \ 26 | INST_SCRIPTS=/headless/install \ 27 | NO_VNC_HOME=/headless/noVNC \ 28 | DEBIAN_FRONTEND=noninteractive \ 29 | VNC_COL_DEPTH=24 \ 30 | VNC_RESOLUTION=1280x1024 \ 31 | VNC_PW=vncpassword \ 32 | VNC_VIEW_ONLY=false 33 | WORKDIR $HOME 34 | 35 | ### Add all install scripts for further steps 36 | ADD ./src/common/install/ $INST_SCRIPTS/ 37 | ADD ./src/debian/install/ $INST_SCRIPTS/ 38 | 39 | ### Install some common tools 40 | RUN $INST_SCRIPTS/tools.sh 41 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 42 | 43 | ### Install custom fonts 44 | RUN $INST_SCRIPTS/install_custom_fonts.sh 45 | 46 | ### Install xvnc-server & noVNC - HTML5 based VNC viewer 47 | RUN $INST_SCRIPTS/tigervnc.sh 48 | RUN $INST_SCRIPTS/no_vnc.sh 49 | 50 | ### Install firefox and chrome browser 51 | RUN $INST_SCRIPTS/firefox.sh 52 | RUN $INST_SCRIPTS/chrome.sh 53 | 54 | ### Install IceWM UI 55 | RUN $INST_SCRIPTS/icewm_ui.sh 56 | ADD ./src/debian/icewm/ $HOME/ 57 | 58 | ### configure startup 59 | RUN $INST_SCRIPTS/libnss_wrapper.sh 60 | ADD ./src/common/scripts $STARTUPDIR 61 | RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME 62 | 63 | USER 1000 64 | 65 | ENTRYPOINT ["/dockerstartup/vnc_startup.sh"] 66 | CMD ["--wait"] 67 | -------------------------------------------------------------------------------- /Dockerfile.debian-xfce-vnc: -------------------------------------------------------------------------------- 1 | # This Dockerfile is used to build an headles vnc image based on Debian 2 | 3 | FROM debian:12 4 | 5 | LABEL maintainer="Sven Nierlein sven@consol.de" 6 | ENV REFRESHED_AT=2024-08-28 7 | 8 | LABEL io.k8s.description="Headless VNC Container with Xfce window manager, firefox and chromium" \ 9 | io.k8s.display-name="Headless VNC Container based on Debian" \ 10 | io.openshift.expose-services="6901:http,5901:xvnc" \ 11 | io.openshift.tags="vnc, debian, xfce" \ 12 | io.openshift.non-scalable=true 13 | 14 | ## Connection ports for controlling the UI: 15 | # VNC port:5901 16 | # noVNC webport, connect via http://IP:6901/?password=vncpassword 17 | ENV DISPLAY=:1 \ 18 | VNC_PORT=5901 \ 19 | NO_VNC_PORT=6901 20 | EXPOSE $VNC_PORT $NO_VNC_PORT 21 | 22 | ### Envrionment config 23 | ENV HOME=/headless \ 24 | TERM=xterm \ 25 | STARTUPDIR=/dockerstartup \ 26 | INST_SCRIPTS=/headless/install \ 27 | NO_VNC_HOME=/headless/noVNC \ 28 | DEBIAN_FRONTEND=noninteractive \ 29 | VNC_COL_DEPTH=24 \ 30 | VNC_RESOLUTION=1280x1024 \ 31 | VNC_PW=vncpassword \ 32 | VNC_VIEW_ONLY=false 33 | WORKDIR $HOME 34 | 35 | ### Add all install scripts for further steps 36 | ADD ./src/common/install/ $INST_SCRIPTS/ 37 | ADD ./src/debian/install/ $INST_SCRIPTS/ 38 | 39 | ### Install some common tools 40 | RUN $INST_SCRIPTS/tools.sh 41 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 42 | 43 | ### Install custom fonts 44 | RUN $INST_SCRIPTS/install_custom_fonts.sh 45 | 46 | ### Install xvnc-server & noVNC - HTML5 based VNC viewer 47 | RUN $INST_SCRIPTS/tigervnc.sh 48 | RUN $INST_SCRIPTS/no_vnc.sh 49 | 50 | ### Install firefox and chrome browser 51 | RUN $INST_SCRIPTS/firefox.sh 52 | RUN $INST_SCRIPTS/chrome.sh 53 | 54 | ### Install xfce UI 55 | RUN $INST_SCRIPTS/xfce_ui.sh 56 | ADD ./src/common/xfce/ $HOME/ 57 | 58 | ### configure startup 59 | RUN $INST_SCRIPTS/libnss_wrapper.sh 60 | ADD ./src/common/scripts $STARTUPDIR 61 | RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME 62 | 63 | USER 1000 64 | 65 | ENTRYPOINT ["/dockerstartup/vnc_startup.sh"] 66 | CMD ["--wait"] 67 | -------------------------------------------------------------------------------- /Dockerfile.rocky-icewm-vnc: -------------------------------------------------------------------------------- 1 | # This Dockerfile is used to build an headles vnc image based on Rocky linux 2 | 3 | FROM rockylinux:9 4 | 5 | LABEL maintainer="Sven Nierlein sven@consol.de" 6 | ENV REFRESHED_AT=2024-08-28 7 | 8 | LABEL io.k8s.description="Headless VNC Container with IceWM window manager, firefox and chromium" \ 9 | io.k8s.display-name="Headless VNC Container based on Rocky linux" \ 10 | io.openshift.expose-services="6901:http,5901:xvnc" \ 11 | io.openshift.tags="vnc, rocky, icewm" \ 12 | io.openshift.non-scalable=true 13 | 14 | ## Connection ports for controlling the UI: 15 | # VNC port:5901 16 | # noVNC webport, connect via http://IP:6901/?password=vncpassword 17 | ENV DISPLAY=:1 \ 18 | VNC_PORT=5901 \ 19 | NO_VNC_PORT=6901 20 | EXPOSE $VNC_PORT $NO_VNC_PORT 21 | 22 | ### Envrionment config 23 | ENV HOME=/headless \ 24 | TERM=xterm \ 25 | STARTUPDIR=/dockerstartup \ 26 | INST_SCRIPTS=/headless/install \ 27 | NO_VNC_HOME=/headless/noVNC \ 28 | VNC_COL_DEPTH=24 \ 29 | VNC_RESOLUTION=1280x1024 \ 30 | VNC_PW=vncpassword \ 31 | VNC_VIEW_ONLY=false 32 | WORKDIR $HOME 33 | 34 | ### Add all install scripts for further steps 35 | ADD ./src/common/install/ $INST_SCRIPTS/ 36 | ADD ./src/rocky/install/ $INST_SCRIPTS/ 37 | 38 | ### Install some common tools 39 | RUN $INST_SCRIPTS/tools.sh 40 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 41 | 42 | ### Install xvnc-server & noVNC - HTML5 based VNC viewer 43 | RUN $INST_SCRIPTS/tigervnc.sh 44 | RUN $INST_SCRIPTS/no_vnc.sh 45 | 46 | ### Install firefox and chrome browser 47 | RUN $INST_SCRIPTS/firefox.sh 48 | RUN $INST_SCRIPTS/chrome.sh 49 | 50 | ### Install IceWM UI 51 | RUN $INST_SCRIPTS/icewm_ui.sh 52 | ADD ./src/rocky/icewm/ $HOME/ 53 | 54 | ### configure startup 55 | RUN $INST_SCRIPTS/libnss_wrapper.sh 56 | ADD ./src/common/scripts $STARTUPDIR 57 | RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME 58 | RUN $INST_SCRIPTS/rocky.sh 59 | 60 | USER 1000 61 | 62 | ENTRYPOINT ["/dockerstartup/vnc_startup.sh"] 63 | CMD ["--wait"] 64 | -------------------------------------------------------------------------------- /Dockerfile.rocky-xfce-vnc: -------------------------------------------------------------------------------- 1 | # This Dockerfile is used to build an headles vnc image based on Rocky linux 2 | 3 | FROM rockylinux:9 4 | 5 | LABEL maintainer="Sven Nierlein sven@consol.de" 6 | ENV REFRESHED_AT=2024-08-28 7 | 8 | LABEL io.k8s.description="Headless VNC Container with Xfce window manager, firefox and chromium" \ 9 | io.k8s.display-name="Headless VNC Container based on Rocky linux" \ 10 | io.openshift.expose-services="6901:http,5901:xvnc" \ 11 | io.openshift.tags="vnc, rocky, xfce" \ 12 | io.openshift.non-scalable=true 13 | 14 | ## Connection ports for controlling the UI: 15 | # VNC port:5901 16 | # noVNC webport, connect via http://IP:6901/?password=vncpassword 17 | ENV DISPLAY=:1 \ 18 | VNC_PORT=5901 \ 19 | NO_VNC_PORT=6901 20 | EXPOSE $VNC_PORT $NO_VNC_PORT 21 | 22 | ### Envrionment config 23 | ENV HOME=/headless \ 24 | TERM=xterm \ 25 | STARTUPDIR=/dockerstartup \ 26 | INST_SCRIPTS=/headless/install \ 27 | NO_VNC_HOME=/headless/noVNC \ 28 | VNC_COL_DEPTH=24 \ 29 | VNC_RESOLUTION=1280x1024 \ 30 | VNC_PW=vncpassword \ 31 | VNC_VIEW_ONLY=false 32 | WORKDIR $HOME 33 | 34 | ### Add all install scripts for further steps 35 | ADD ./src/common/install/ $INST_SCRIPTS/ 36 | ADD ./src/rocky/install/ $INST_SCRIPTS/ 37 | 38 | ### Install some common tools 39 | RUN $INST_SCRIPTS/tools.sh 40 | ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8' 41 | 42 | ### Install xvnc-server & noVNC - HTML5 based VNC viewer 43 | RUN $INST_SCRIPTS/tigervnc.sh 44 | RUN $INST_SCRIPTS/no_vnc.sh 45 | 46 | ### Install firefox and chrome browser 47 | RUN $INST_SCRIPTS/firefox.sh 48 | RUN $INST_SCRIPTS/chrome.sh 49 | 50 | ### Install xfce UI 51 | RUN $INST_SCRIPTS/xfce_ui.sh 52 | ADD ./src/common/xfce/ $HOME/ 53 | 54 | ### configure startup 55 | RUN $INST_SCRIPTS/libnss_wrapper.sh 56 | ADD ./src/common/scripts $STARTUPDIR 57 | RUN $INST_SCRIPTS/set_user_permission.sh $STARTUPDIR $HOME 58 | RUN $INST_SCRIPTS/rocky.sh 59 | 60 | USER 1000 61 | 62 | ENTRYPOINT ["/dockerstartup/vnc_startup.sh"] 63 | CMD ["--wait"] 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | 203 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | 2 | build: build-debian-xfce-vnc 3 | 4 | build-debian-xfce-vnc: 5 | docker build -t local/debian-xfce-vnc -f ./Dockerfile.debian-xfce-vnc . 6 | 7 | build-debian-icewm-vnc: 8 | docker build -t local/debian-icewm-vnc -f ./Dockerfile.debian-icewm-vnc . 9 | 10 | build-rocky-xfce-vnc: 11 | docker build -t local/rocky-xfce-vnc -f ./Dockerfile.rocky-xfce-vnc . 12 | 13 | build-rocky-icewm-vnc: 14 | docker build -t local/rocky-icewm-vnc -f ./Dockerfile.rocky-icewm-vnc . 15 | 16 | run: run-debian-xfce-vnc 17 | 18 | run-debian-xfce-vnc: 19 | docker run -ti --rm -p 6901:6901 -p 5901:5901 local/debian-xfce-vnc 20 | 21 | run-debian-icewm-vnc: 22 | docker run -ti --rm -p 6901:6901 -p 5901:5901 local/debian-icewm-vnc 23 | 24 | run-rocky-xfce-vnc: 25 | docker run -ti --rm -p 6901:6901 -p 5901:5901 local/rocky-xfce-vnc 26 | 27 | run-rocky-icewm-vnc: 28 | docker run -ti --rm -p 6901:6901 -p 5901:5901 local/rocky-icewm-vnc 29 | 30 | clean: 31 | $(MAKE) -C t clean 32 | 33 | test: 34 | $(MAKE) -C t test 35 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Docker container images with "headless" VNC session 2 | 3 | This repository contains a collection of Docker images with headless VNC environments. 4 | 5 | Each Docker image is installed with the following components: 6 | 7 | * Desktop environment [**Xfce4**](http://www.xfce.org) or [**IceWM**](http://www.icewm.org/) 8 | * VNC-Server (default VNC port `5901`) 9 | * [**noVNC**](https://github.com/novnc/noVNC) - HTML5 VNC client (default http port `6901`) 10 | * Browsers: 11 | * Mozilla Firefox 12 | * Chromium 13 | 14 | ![Docker VNC Desktop access via HTML page](.pics/vnc_container_view.png) 15 | 16 | ## Build Status 17 | [![Build Status MASTER](https://github.com/ConSol/docker-headless-vnc-container/actions/workflows/nightly.yml/badge.svg)](https://github.com/ConSol/docker-headless-vnc-container/actions/workflows/nightly.yml) 18 | 19 | ## Current provided OS & UI sessions: 20 | * `consol/rocky-xfce-vnc`: __Rocky 9 with `Xfce4` UI session__ 21 | * `consol/debian-xfce-vnc`: __Debian 11 with `Xfce4` UI session__ 22 | * `consol/rocky-icewm-vnc`: __Rocky 9 with `IceWM` UI session__ 23 | * `consol/debian-icewm-vnc`: __Debian 11 with `IceWM` UI session__ 24 | 25 | ## OpenShift / Kubernetes 26 | 27 | It's also possible to run the images in container orchestration platforms like [Kubernetes](https://kubernetes.io) or [OpenShift](https://openshift.io/). For more information how to deploy containers in the cluster, take a look at: 28 | 29 | * [Kubernetes usage of "headless" VNC Docker images](./kubernetes/README.md) 30 | * [OpenShift usage of "headless" VNC Docker images](./openshift/README.md) 31 | 32 | ## Usage 33 | Usage is **similar** for all provided images, e.g. for `consol/rocky-xfce-vnc`: 34 | 35 | - Print out help page: 36 | 37 | docker run consol/rocky-xfce-vnc --help 38 | 39 | - Run command with mapping to local port `5901` (vnc protocol) and `6901` (vnc web access): 40 | 41 | docker run -d -p 5901:5901 -p 6901:6901 consol/rocky-xfce-vnc 42 | 43 | - Change the default user and group within a container to your own with adding `--user $(id -u):$(id -g)`: 44 | 45 | docker run -d -p 5901:5901 -p 6901:6901 --user $(id -u):$(id -g) consol/rocky-xfce-vnc 46 | 47 | - If you want to get into the container use interactive mode `-it` and `bash` 48 | 49 | docker run -it -p 5901:5901 -p 6901:6901 consol/rocky-xfce-vnc bash 50 | 51 | - Build an image from scratch: 52 | 53 | docker build -t consol/rocky-xfce-vnc rocky-xfce-vnc 54 | 55 | # Connect & Control 56 | If the container is started like mentioned above, connect via one of these options: 57 | 58 | * connect via __VNC viewer `localhost:5901`__, default password: `vncpassword` 59 | * connect via __noVNC HTML5 full client__: [`http://localhost:6901/vnc.html`](http://localhost:6901/vnc.html), default password: `vncpassword` 60 | * connect via __noVNC HTML5 lite client__: [`http://localhost:6901/?password=vncpassword`](http://localhost:6901/?password=vncpassword) 61 | 62 | 63 | ## Hints 64 | 65 | ### 1) Extend a Image with your own software 66 | Since version `1.1.0` all images run as non-root user per default, so if you want to extend the image and install software, you have to switch back to the `root` user: 67 | 68 | ```bash 69 | ## Custom Dockerfile 70 | FROM consol/rocky-xfce-vnc 71 | ENV REFRESHED_AT 2022-10-12 72 | 73 | # Switch to root user to install additional software 74 | USER 0 75 | 76 | ## Install a gedit 77 | RUN yum install -y gedit \ 78 | && yum clean all 79 | 80 | ## switch back to default user 81 | USER 1000 82 | ``` 83 | 84 | ### 2) Change User of running VNC Container 85 | 86 | Per default, since version `1.3.0` all container processes will be executed with user id `1000`. You can change the user id as follows: 87 | 88 | #### 2.1) Using root (user id `0`) 89 | Add the `--user` flag to your docker run command: 90 | 91 | docker run -it --user 0 -p 6911:6901 consol/rocky-xfce-vnc 92 | 93 | #### 2.2) Using user and group id of host system 94 | Add the `--user` flag to your docker run command: 95 | 96 | docker run -it -p 6911:6901 --user $(id -u):$(id -g) consol/rocky-xfce-vnc 97 | 98 | ### 3) Override VNC environment variables 99 | The following VNC environment variables can be overwritten at the `docker run` phase to customize your desktop environment inside the container: 100 | * `VNC_COL_DEPTH`, default: `24` 101 | * `VNC_RESOLUTION`, default: `1280x1024` 102 | * `VNC_PW`, default: `my-pw` 103 | * `VNC_PASSWORDLESS`, default: `` 104 | 105 | #### 3.1) Example: Override the VNC password 106 | Simply overwrite the value of the environment variable `VNC_PW`. For example in 107 | the docker run command: 108 | 109 | docker run -it -p 5901:5901 -p 6901:6901 -e VNC_PW=my-pw consol/rocky-xfce-vnc 110 | 111 | #### 3.2) Example: Override the VNC resolution 112 | Simply overwrite the value of the environment variable `VNC_RESOLUTION`. For example in 113 | the docker run command: 114 | 115 | docker run -it -p 5901:5901 -p 6901:6901 -e VNC_RESOLUTION=800x600 consol/rocky-xfce-vnc 116 | 117 | #### 3.3) Example: Start passwordless 118 | Set `VNC_PASSWORDLESS` to `true` to disable the VNC password. 119 | It is highly recommended that you put some kind of authorization mechanism 120 | before this. For example in the docker run command: 121 | 122 | docker run -it -p 5901:5901 -p 6901:6901 -e VNC_PASSWORDLESS=true consol/rocky-xfce-vnc 123 | 124 | ### 4) View only VNC 125 | Since version `1.2.0` it's possible to prevent unwanted control via VNC. Therefore you can set the environment variable `VNC_VIEW_ONLY=true`. If set, the startup script will create a random password for the control connection and use the value of `VNC_PW` for view only connection over the VNC connection. 126 | 127 | docker run -it -p 5901:5901 -p 6901:6901 -e VNC_VIEW_ONLY=true consol/rocky-xfce-vnc 128 | 129 | ### 5) Known Issues 130 | 131 | #### 5.1) Chromium crashes with high VNC_RESOLUTION ([#53](https://github.com/ConSol/docker-headless-vnc-container/issues/53)) 132 | If you open some graphic/work intensive websites in the Docker container (especially with high resolutions e.g. `1920x1080`) it can happen that Chromium crashes without any specific reason. The problem there is the too small `/dev/shm` size in the container. Currently there is no other way, as define this size on startup via `--shm-size` option, see [#53 - Solution](https://github.com/ConSol/docker-headless-vnc-container/issues/53#issuecomment-347265977): 133 | 134 | docker run --shm-size=256m -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/rocky-xfce-vnc chromium-browser http://map.norsecorp.com/ 135 | 136 | Thx @raghavkarol for the hint! 137 | 138 | ## How to release 139 | See **[how-to-release.md](./how-to-release.md)** 140 | 141 | ## Contributors 142 | 143 | At this point we want to thank all contributors, which helped to move this great project by submitting code, writing documentation, or adapting other tools to play well together with the docker headless container. 144 | 145 | * [Sven Nierlein](https://github.com/sni) 146 | * [Tobias Schneck](https://github.com/toschneck) 147 | * [Robert Bohne](https://github.com/rbo) - IceWM images 148 | * [hsiaoyi0504](https://github.com/hsiaoyi0504) - PR [#66](https://github.com/ConSol/docker-headless-vnc-container/pull/66) 149 | * [dmhumph](https://github.com/dmhumph) - PR [#44](https://github.com/ConSol/docker-headless-vnc-container/issue/44) 150 | * [Simon Hofmann](https://github.com/s1hofmann) 151 | 152 | ## Changelog 153 | 154 | The current changelog is provided here: **[changelog.md](./changelog.md)** 155 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | ## Changelog of the Docker headless VNC images 2 | 3 | ### Version 2.0.4: 4 | * fix passwordless startup crash ([#201](https://github.com/ConSol/docker-headless-vnc-container/issues/201))) 5 | 6 | ### Version 2.0.3: 7 | * update Kubernetes Manifest example ([#197](https://github.com/ConSol/docker-headless-vnc-container/issues/197))) 8 | 9 | ### Version 2.0.2: 10 | * fix not exposing VNC port ([#165](https://github.com/ConSol/docker-headless-vnc-container/issues/165))) 11 | 12 | ### Version 2.0.1: 13 | * add passwordless vnc option 14 | * fix chrome crash due to shm size 15 | 16 | ### Version 2.0.0: 17 | * migrated ubuntu to debian 11 18 | * migrated centos 7 to rocky linux 9 19 | 20 | ### Version 1.4.0: 21 | * added Github issue and pull request templates 22 | * added install script for custom fonts ([#83](https://github.com/ConSol/docker-headless-vnc-container/issues/83))) 23 | * fixed problem that VNC password was not properly set after doing a Docker commit ([#88](https://github.com/ConSol/docker-headless-vnc-container/issues/88)) 24 | * fixed some typos ([#87](https://github.com/ConSol/docker-headless-vnc-container/issues/87)) 25 | * added 'how-to-release' info ([#75](https://github.com/ConSol/docker-headless-vnc-container/issues/75)) 26 | * added Travis build ([#74](https://github.com/ConSol/docker-headless-vnc-container/issues/74)) 27 | 28 | ### Version 1.3.0: 29 | * change default USER to `1000` ([#61](https://github.com/ConSol/docker-headless-vnc-container/issues/61)) 30 | * refactor vnc startup script ([#73](https://github.com/ConSol/docker-headless-vnc-container/issues/73)) 31 | * add help option `--help` 32 | * ensure correct forwarding of shutdown signals 33 | * add "DEBUG" mode and move all log output to this mode 34 | * update README.md 35 | * merge pull request from: 36 | * [hsiaoyi0504](https://github.com/hsiaoyi0504) update noVNC to [v1.0.0](https://github.com/novnc/noVNC/releases/tag/v1.0.0) ([#66](https://github.com/ConSol/docker-headless-vnc-container/pull/66)) 37 | * add example for [Kubernetes usage](./kubernetes/README.md) ([#71](https://github.com/ConSol/docker-headless-vnc-container/issues/71)) 38 | * remove verbose output by default from `set_user_permissions.sh` script 39 | 40 | ### Version 1.2.3: 41 | 42 | * start no_vnc with localhost instead of VNC_IP to ensure startup on docker bridge mode ([#41](https://github.com/ConSol/docker-headless-vnc-container/issue/41)) 43 | * add xfce4-terminal to enable copy and paste ([#55](https://github.com/ConSol/docker-headless-vnc-container/issue/55)) 44 | * add save mode for tag_image.sh script 45 | * disable trigger latest Dockerhub build -> use tag_image.sh script 46 | * use correct python-numpy packages 47 | * add "Known Issues" documentation: [Chromium crashes with high VNC_RESOLUTION](https://github.com/ConSol/docker-headless-vnc-container#51-chromium-crashes-with-high-vnc_resolution-53) 48 | 49 | ### Version 1.2.2 50 | * disable automatic firefox updates ([#45](https://github.com/ConSol/docker-headless-vnc-container/issue/45)) 51 | * fix wrong env usage of `$HOME` ([#47](https://github.com/ConSol/docker-headless-vnc-container/issue/47)) 52 | * fix hanging vnc handshake if container is offline ([#50](https://github.com/ConSol/docker-headless-vnc-container/issue/50)) 53 | * Merge pull request from: 54 | * [dmhumph](https://github.com/dmhumph): Update OpenShift instructions for OCP 3.5 or greater ([#44](https://github.com/ConSol/docker-headless-vnc-container/issue/44)) 55 | 56 | ### Version 1.2.1 57 | * Centos7: use temporally epel-testing repo to fix chrome error `libpng warning: Application built with libpng-1.6.22 but running with 1.5.13` in version `60.0.3112.113-2.el7` 58 | * Fix broken `docker stop/start` ([#40](https://github.com/ConSol/docker-headless-vnc-container/issues/40)) 59 | 60 | ### Version 1.2.0 61 | * Use fixed firefox version `45.9.0esr` ([#39](https://github.com/ConSol/docker-headless-vnc-container/issues/39), [#20](https://github.com/ConSol/docker-headless-vnc-container/issues/20), [#16](https://github.com/ConSol/docker-headless-vnc-container/issues/16)) 62 | * fix memory consumption problems in comparison to current firefox 55 63 | * tested on long term container issues without crashes 64 | * Add en_US.UTF-8 as default locale ([#27](https://github.com/ConSol/docker-headless-vnc-container/issues/27)) 65 | * Add enviroment variable `VNC_VIEW_ONLY=true` for view only VNC connections ([#25](https://github.com/ConSol/docker-headless-vnc-container/issues/25)) 66 | * Update to tigervnc version `1.8` 67 | * Use a more stable command for ip determination (PR [#31](https://github.com/ConSol/docker-headless-vnc-container/issues/31), thx to @arnaudveron) 68 | * Support empty `CMD` values in startup script ([#32](https://github.com/ConSol/docker-headless-vnc-container/issues/32)) 69 | * Add chromium flag `--disable-gpu` to work for current chromium ([#36](https://github.com/ConSol/docker-headless-vnc-container/issues/36)) 70 | * Add `TERM=xterm` environment var ([#37](https://github.com/ConSol/docker-headless-vnc-container/issues/37)) 71 | 72 | ### Version 1.1.0 73 | 74 | * Add OpenShift support ([#3](https://github.com/ConSol/docker-headless-vnc-container/issues/3)) 75 | * Support for start container process as non-root in usermode ([#7](https://github.com/ConSol/docker-headless-vnc-container/issues/7)) 76 | * Add Labels for OpenShift 77 | * Add [IceWM](http://www.icewm.org/) as alternative UI 78 | * Remove Java installation, not needed in this image ([#5](https://github.com/ConSol/docker-headless-vnc-container/issues/5)) 79 | * Refactor build structure ([#5](https://github.com/ConSol/docker-headless-vnc-container/issues/5)) 80 | * Fix chromium/chrome startup ([#2](https://github.com/ConSol/docker-headless-vnc-container/issues/2)): Set chromium as default "chrome" and support `~/.chromium-browser.init` 81 | * Switch from vnc4server to tigervnc ([#4](https://github.com/ConSol/docker-headless-vnc-container/issues/4)) 82 | * Remove not needed Screensaver pacakges ([#11](https://github.com/ConSol/docker-headless-vnc-container/issues/11)) 83 | * Use Firefox 45 as fixed browser as long current firefox crashes ([#16](https://github.com/ConSol/docker-headless-vnc-container/issues/16)) 84 | * Fix issue be starting of reattached containers on `docker start` ([#15](https://github.com/ConSol/docker-headless-vnc-container/issues/15)) 85 | -------------------------------------------------------------------------------- /how-to-release.md: -------------------------------------------------------------------------------- 1 | # How to release 2 | 3 | * Check if `changelog.md` is correct 4 | * Check if all features are merged in master and pushed 5 | * Pull the latest `nightly` images 6 | * Test if the latest `nightly` build is usable 7 | * On success - add git branch v{TAG} and tag and push branch 8 | -------------------------------------------------------------------------------- /kubernetes/README.md: -------------------------------------------------------------------------------- 1 | # Kubernetes usage of "headless" VNC Docker images 2 | 3 | The following content uses as example the image `consol/rocky-xfce-vnc` of the Dockerfile [`Dockerfile.rocky-xfce-vnc`](../Dockerfile.rocky-xfce-vnc). 4 | 5 | ## Deploy one pod of `rocky-xfce-vnc` image and expose a service 6 | 7 | On an already logged in Kubernetes cluster just use the predefined deployment with service config [`kubernetes.headless-vnc.example.deployment.yaml`](kubernetes.headless-vnc.example.deployment.yaml): 8 | 9 | kubectl apply -f kubernetes/kubernetes.headless-vnc.example.deployment.yaml 10 | 11 | Now a new pod with corresponding service should spin up with `ContainerCreating`: 12 | 13 | ```bash 14 | kubectl get pods --output=wide 15 | 16 | NAME READY STATUS RESTARTS AGE IP NODE 17 | headless-vnc-7f6bc46c84-hrhc2 0/1 ContainerCreating 0 28s kubermatic-s9g9frstlk-n7tw6 18 | ``` 19 | 20 | After a while the kublet will have downloaded the imaged and started - shown as `Running`: 21 | 22 | ```bash 23 | kubectl get pods --output=wide 24 | 25 | NAME READY STATUS RESTARTS AGE IP NODE 26 | headless-vnc-7f6bc46c84-hrhc2 1/1 Running 0 3m 172.25.2.3 kubermatic-s9g9frstlk-n7tw6 27 | ``` 28 | **ATTENTION:** the above shown IP the cluster **INTERNAL** one! 29 | 30 | Due to the following service configuration, the service will be exposed as type `NodePort`, this means that the service will accessible through the IP of the Kubernetes node and the exposed `nodePort`. 31 | 32 | ```yaml 33 | apiVersion: v1 34 | kind: Service 35 | metadata: 36 | labels: 37 | application: headless-vnc 38 | name: headless-vnc 39 | spec: 40 | externalName: headless-vnc 41 | ports: 42 | - name: http-port-tcp 43 | protocol: TCP 44 | port: 6901 45 | targetPort: 6901 46 | nodePort: 32001 47 | #... 48 | selector: 49 | application: headless-vnc 50 | type: NodePort 51 | 52 | ``` 53 | In this case you have to determine the **EXTERNAL IP** of the node `kubermatic-s9g9frstlk-n7tw6`. The you can connect to the pod via [http://:32001/?password=vncpassword](http://:32001/?password=vncpassword). 54 | 55 | ## Delete deployment 56 | 57 | Execute the command: 58 | 59 | kubectl delete -f kubernetes/kubernetes.headless-vnc.example.deployment.yaml -------------------------------------------------------------------------------- /kubernetes/kubernetes.headless-vnc.example.deployment.yaml: -------------------------------------------------------------------------------- 1 | #### POD config (run one time) 2 | apiVersion: apps/v1 3 | kind: Deployment 4 | metadata: 5 | name: headless-vnc 6 | labels: 7 | application: headless-vnc 8 | spec: 9 | # 1 Pods should exist at all times. 10 | replicas: 1 11 | selector: 12 | matchLabels: 13 | application: headless-vnc 14 | template: 15 | metadata: 16 | labels: 17 | application: headless-vnc 18 | spec: 19 | terminationGracePeriodSeconds: 5 20 | containers: 21 | - name: headless-vnc 22 | image: consol/rocky-xfce-vnc 23 | imagePullPolicy: Always 24 | args: 25 | ### make normal UI startup to connect via: oc rsh bash 26 | - '--tail-log' 27 | ### checks that vnc server is up and running 28 | livenessProbe: 29 | tcpSocket: 30 | port: 5901 31 | initialDelaySeconds: 1 32 | timeoutSeconds: 1 33 | ### checks if http-vnc connection is working 34 | readinessProbe: 35 | httpGet: 36 | path: / 37 | port: 6901 38 | scheme: HTTP 39 | initialDelaySeconds: 1 40 | timeoutSeconds: 1 41 | #TODO remove later 42 | securityContext: 43 | runAsUser: 0 44 | 45 | --- 46 | apiVersion: v1 47 | kind: Service 48 | metadata: 49 | labels: 50 | application: headless-vnc 51 | name: headless-vnc 52 | spec: 53 | externalName: headless-vnc 54 | ports: 55 | - name: http-port-tcp 56 | protocol: TCP 57 | port: 6901 58 | targetPort: 6901 59 | nodePort: 32001 60 | - name: vnc-port-tcp 61 | protocol: TCP 62 | port: 5901 63 | targetPort: 5901 64 | nodePort: 32002 65 | selector: 66 | application: headless-vnc 67 | # type: NodePort 68 | #### connect by: http://NODEIP:NODEPORT/?password=vncpassword 69 | # Use type loadbalancer if needed 70 | type: LoadBalancer 71 | -------------------------------------------------------------------------------- /openshift/README.md: -------------------------------------------------------------------------------- 1 | # OpenShift usage of "headless" VNC Docker images 2 | 3 | The following content uses as example the image `consol/rocky-xfce-vnc` of the Dockerfile `Dockerfile.rocky-xfce-vnc`. 4 | 5 | ## Run the image from Dockerhub 6 | 7 | cd openshift 8 | oc new-project my-project 9 | 10 | As soon as you are logged in and selected your oc project, you can simple run the image by using the configuration `openshift.headless-vnc.run.yaml`: 11 | 12 | oc process -f openshift.headless-vnc.run.yaml -v APPLICATION_NAME=myrunonlypod IMAGE=consol/rocky-xfce-vnc | oc create -f - 13 | # service "my-run-only-pod" created 14 | # route "my-run-only-pod" created 15 | # imagestream "my-run-only-pod" created 16 | # deploymentconfig "my-run-only-pod" created 17 | 18 | After the deployment you will see at your management UI the new deployed service ``: 19 | 20 | [https://__YOUR-OS-MANAGEMENT-URL__/console/project/my-project/overview]() 21 | 22 | ![openshift management consol run-only service](../.pics/os_run_only.png) 23 | 24 | 25 | Over the URL you can look and control the fresh deployed container via the web-vnc interface: 26 | 27 | [http://my-run-only-pod-my-project.__YOUR-OS-URL__/?password=vncpassword]() 28 | 29 | ![openshift container via webvnc](../.pics/vnc_container_view.png) 30 | 31 | 32 | ## Build & Run your own image 33 | 34 | If you want to build the image in your own infrastructure just use the configuration `openshift.headless-vnc.buildandrun.yaml`: 35 | 36 | oc process -f openshift.headless-vnc.buildandrun.yaml -v APPLICATION_NAME=my-rocky-xfce-image,SOURCE_DOCKERFILE=Dockerfile.rocky-xfce-vnc,SOURCE_REPOSITORY_REF=master | oc create -f - 37 | # service "my-rocky-xfce-image" created 38 | # route "my-rocky-xfce-image" created 39 | # imagestream "my-rocky-xfce-image" created 40 | # buildconfig "my-rocky-xfce-image" created 41 | # deploymentconfig "my-rocky-xfce-image" created 42 | 43 | Now a fresh image build will be triggerd, see: 44 | 45 | [https://__YOUR-OS-MANAGEMENT-URL__/console/project/my-project/browse/builds/my-rocky-xfce-image/my-rocky-xfce-image-1?tab=logs]() 46 | 47 | ![openshift headless vnc docker image build](../.pics/os_build_and_run.png) 48 | 49 | After the image is successfully built, openshift will autmaticly will deploy it as new service: 50 | 51 | [https://__YOUR-OS-MANAGEMENT-URL__/console/project/my-project/overview]() 52 | 53 | ![openshift management consol build own image service](../.pics/os_build_and_run_deployment.png) 54 | 55 | After the deployment, you you can look and control the fresh deployed container via the web-vnc interface: 56 | 57 | [http://my-rocky-xfce-image.__YOUR-OS-URL__/?password=vncpassword]() 58 | 59 | ![openshift container via webvnc](../.pics/os_container_webvnc.p 60 | -------------------------------------------------------------------------------- /openshift/openshift.headless-vnc.buildandrun.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | labels: 4 | template: headless-vnc-build-and-run 5 | metadata: 6 | annotations: 7 | description: Headless VNC (build & run) 8 | iconClass: icon-beaker 9 | tags: headless,vnc,consol 10 | version: 1.0.3 11 | creationTimestamp: null 12 | name: headless-vnc-build-and-run 13 | objects: 14 | - apiVersion: v1 15 | kind: Service 16 | metadata: 17 | annotations: 18 | description: Headless vnc and http port 19 | labels: 20 | application: ${APPLICATION_NAME} 21 | name: ${APPLICATION_NAME} 22 | spec: 23 | ports: 24 | - name: http-port-tcp 25 | protocol: TCP 26 | port: 6901 27 | targetPort: 6901 28 | - name: vnc-port-tcp 29 | protocol: TCP 30 | port: 5901 31 | targetPort: 5901 32 | selector: 33 | deploymentConfig: ${APPLICATION_NAME} 34 | - apiVersion: v1 35 | id: ${APPLICATION_NAME}-http 36 | kind: Route 37 | metadata: 38 | annotations: 39 | description: Route for vnc's http service. 40 | labels: 41 | application: ${APPLICATION_NAME} 42 | name: ${APPLICATION_NAME} 43 | spec: 44 | host: ${HOSTNAME_HTTP} 45 | to: 46 | name: ${APPLICATION_NAME} 47 | port: 48 | targetPort: http-port-tcp 49 | - apiVersion: v1 50 | kind: ImageStream 51 | metadata: 52 | labels: 53 | application: ${APPLICATION_NAME} 54 | name: ${APPLICATION_NAME} 55 | - apiVersion: v1 56 | kind: BuildConfig 57 | metadata: 58 | labels: 59 | application: ${APPLICATION_NAME} 60 | name: ${APPLICATION_NAME} 61 | spec: 62 | output: 63 | to: 64 | kind: ImageStreamTag 65 | name: ${APPLICATION_NAME}:latest 66 | source: 67 | git: 68 | ref: ${SOURCE_REPOSITORY_REF} 69 | uri: ${SOURCE_REPOSITORY_URL} 70 | type: Git 71 | strategy: 72 | type: Docker 73 | dockerStrategy: 74 | dockerfilePath: ${SOURCE_DOCKERFILE} 75 | triggers: 76 | - github: 77 | secret: ${GITHUB_WEBHOOK_SECRET} 78 | type: GitHub 79 | - generic: 80 | secret: ${GENERIC_WEBHOOK_SECRET} 81 | type: Generic 82 | - imageChange: {} 83 | type: ImageChange 84 | - type: ConfigChange 85 | - apiVersion: v1 86 | kind: DeploymentConfig 87 | metadata: 88 | labels: 89 | application: ${APPLICATION_NAME} 90 | name: ${APPLICATION_NAME} 91 | spec: 92 | replicas: 1 93 | selector: 94 | deploymentConfig: ${APPLICATION_NAME} 95 | strategy: 96 | type: Recreate 97 | template: 98 | metadata: 99 | labels: 100 | application: ${APPLICATION_NAME} 101 | deploymentConfig: ${APPLICATION_NAME} 102 | name: ${APPLICATION_NAME} 103 | spec: 104 | containers: 105 | - name: ${APPLICATION_NAME} 106 | image: ${APPLICATION_NAME} 107 | imagePullPolicy: Always 108 | ports: 109 | - containerPort: 5901 110 | name: vnc 111 | protocol: TCP 112 | - containerPort: 6901 113 | name: http 114 | protocol: TCP 115 | livenessProbe: 116 | httpGet: 117 | path: / 118 | port: 6901 119 | scheme: HTTP 120 | initialDelaySeconds: 10 121 | timeoutSeconds: 1 122 | periodSeconds: 10 123 | successThreshold: 1 124 | failureThreshold: 3 125 | readinessProbe: 126 | httpGet: 127 | path: / 128 | port: 6901 129 | scheme: HTTP 130 | initialDelaySeconds: 10 131 | timeoutSeconds: 1 132 | periodSeconds: 10 133 | successThreshold: 1 134 | failureThreshold: 3 135 | triggers: 136 | - imageChangeParams: 137 | automatic: true 138 | containerNames: 139 | - ${APPLICATION_NAME} 140 | from: 141 | kind: ImageStreamTag 142 | name: ${APPLICATION_NAME}:latest 143 | type: ImageChange 144 | - type: ConfigChange 145 | parameters: 146 | - description: The name for the application. 147 | name: APPLICATION_NAME 148 | required: true 149 | value: headless-vnc 150 | - description: 'Custom hostname for http service route. Leave blank for default hostname, 151 | e.g.: -.' 152 | name: HOSTNAME_HTTP 153 | - description: Git source URI for application 154 | name: SOURCE_REPOSITORY_URL 155 | required: true 156 | value: https://github.com/ConSol/docker-headless-vnc-container.git 157 | - description: Git branch/tag reference 158 | name: SOURCE_REPOSITORY_REF 159 | value: "master" 160 | - description: Name of the Dockerfile for example Dockerfile.debian-xfce-vnc, Dockerfile.rocky-icewm-vnc, Dockerfile.debian-icewm-vnc or Dockerfile.rocky-xfce-vnc 161 | name: SOURCE_DOCKERFILE 162 | value: Dockerfile.debian-xfce-vnc 163 | - description: GitHub trigger secret 164 | from: '[a-zA-Z0-9]{8}' 165 | generate: expression 166 | name: GITHUB_WEBHOOK_SECRET 167 | required: true 168 | - description: Generic build trigger secret 169 | from: '[a-zA-Z0-9]{8}' 170 | generate: expression 171 | name: GENERIC_WEBHOOK_SECRET 172 | required: true 173 | -------------------------------------------------------------------------------- /openshift/openshift.headless-vnc.run.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Template 3 | labels: 4 | template: headless-vnc-run 5 | metadata: 6 | annotations: 7 | description: Headless VNC (only run) 8 | iconClass: icon-beaker 9 | tags: headless,vnc,consol 10 | version: 1.0.3 11 | creationTimestamp: null 12 | name: headless-vnc-run 13 | objects: 14 | - apiVersion: v1 15 | kind: Service 16 | metadata: 17 | annotations: 18 | description: Headless vnc and http port 19 | labels: 20 | application: ${APPLICATION_NAME} 21 | name: ${APPLICATION_NAME} 22 | spec: 23 | ports: 24 | - name: http-port-tcp 25 | protocol: TCP 26 | port: 6901 27 | targetPort: 6901 28 | - name: vnc-port-tcp 29 | protocol: TCP 30 | port: 5901 31 | targetPort: 5901 32 | selector: 33 | deploymentConfig: ${APPLICATION_NAME} 34 | - apiVersion: v1 35 | id: ${APPLICATION_NAME}-http 36 | kind: Route 37 | metadata: 38 | annotations: 39 | description: Route for vnc's http service. 40 | labels: 41 | application: ${APPLICATION_NAME} 42 | name: ${APPLICATION_NAME} 43 | spec: 44 | host: ${HOSTNAME_HTTP} 45 | to: 46 | name: ${APPLICATION_NAME} 47 | port: 48 | targetPort: http-port-tcp 49 | - apiVersion: v1 50 | kind: ImageStream 51 | metadata: 52 | labels: 53 | application: ${APPLICATION_NAME} 54 | name: ${APPLICATION_NAME} 55 | - apiVersion: v1 56 | kind: DeploymentConfig 57 | metadata: 58 | labels: 59 | application: ${APPLICATION_NAME} 60 | name: ${APPLICATION_NAME} 61 | spec: 62 | replicas: 1 63 | selector: 64 | deploymentConfig: ${APPLICATION_NAME} 65 | strategy: 66 | type: Recreate 67 | template: 68 | metadata: 69 | labels: 70 | application: ${APPLICATION_NAME} 71 | deploymentConfig: ${APPLICATION_NAME} 72 | name: ${APPLICATION_NAME} 73 | spec: 74 | containers: 75 | - name: ${APPLICATION_NAME} 76 | image: ${IMAGE} 77 | imagePullPolicy: Always 78 | ports: 79 | - containerPort: 5901 80 | name: vnc 81 | protocol: TCP 82 | - containerPort: 6901 83 | name: http 84 | protocol: TCP 85 | livenessProbe: 86 | httpGet: 87 | path: / 88 | port: 6901 89 | scheme: HTTP 90 | initialDelaySeconds: 10 91 | timeoutSeconds: 1 92 | periodSeconds: 10 93 | successThreshold: 1 94 | failureThreshold: 3 95 | readinessProbe: 96 | httpGet: 97 | path: / 98 | port: 6901 99 | scheme: HTTP 100 | initialDelaySeconds: 10 101 | timeoutSeconds: 1 102 | periodSeconds: 10 103 | successThreshold: 1 104 | failureThreshold: 3 105 | triggers: 106 | - type: ConfigChange 107 | parameters: 108 | - description: The name for the application. 109 | name: APPLICATION_NAME 110 | required: true 111 | value: headless-vnc 112 | - description: 'Custom hostname for http service route. Leave blank for default hostname, 113 | e.g.: -.' 114 | name: HOSTNAME_HTTP 115 | - description: Headless vnc image 116 | name: IMAGE 117 | required: true 118 | value: consol/rocky-xfce-vnc:dev 119 | -------------------------------------------------------------------------------- /src/common/install/firefox.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | VERSION="102.3.0esr" 5 | echo "Install Firefox $VERSION" 6 | 7 | function disableUpdate(){ 8 | ff_def="$1/browser/defaults/profile" 9 | mkdir -p $ff_def 10 | echo < $ff_def/user.js 20 | } 21 | 22 | function instFF() { 23 | if [ ! "${1:0:1}" == "" ]; then 24 | FF_VERS=$1 25 | if [ ! "${2:0:1}" == "" ]; then 26 | FF_INST=$2 27 | echo "download Firefox $FF_VERS and install it to '$FF_INST'." 28 | mkdir -p "$FF_INST" 29 | FF_URL=http://releases.mozilla.org/pub/firefox/releases/$FF_VERS/linux-x86_64/en-US/firefox-$FF_VERS.tar.bz2 30 | echo "FF_URL: $FF_URL" 31 | wget -qO- $FF_URL | tar xvj --strip 1 -C $FF_INST/ 32 | ln -s "$FF_INST/firefox" /usr/bin/firefox 33 | disableUpdate $FF_INST 34 | exit $? 35 | fi 36 | fi 37 | echo "function parameter are not set correctly please call it like 'instFF [version] [install path]'" 38 | exit -1 39 | } 40 | 41 | instFF "$VERSION" '/usr/lib/firefox' 42 | 43 | -------------------------------------------------------------------------------- /src/common/install/no_vnc.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | set -u 5 | 6 | echo "Install noVNC - HTML5 based VNC viewer" 7 | mkdir -p $NO_VNC_HOME/utils/websockify 8 | wget -qO- https://github.com/novnc/noVNC/archive/refs/tags/v1.3.0.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME 9 | # use older version of websockify to prevent hanging connections on offline containers, see https://github.com/ConSol/docker-headless-vnc-container/issues/50 10 | wget -qO- https://github.com/novnc/websockify/archive/refs/tags/v0.10.0.tar.gz | tar xz --strip 1 -C $NO_VNC_HOME/utils/websockify 11 | #chmod +x -v $NO_VNC_HOME/utils/*.sh 12 | ## create index.html to forward automatically to `vnc_lite.html` 13 | ln -s $NO_VNC_HOME/vnc_lite.html $NO_VNC_HOME/index.html 14 | -------------------------------------------------------------------------------- /src/common/install/set_user_permission.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | if [[ -n $DEBUG ]]; then 5 | verbose="-v" 6 | fi 7 | 8 | for var in "$@" 9 | do 10 | echo "fix permissions for: $var" 11 | find "$var"/ -name '*.sh' -exec chmod $verbose a+x {} + 12 | find "$var"/ -name '*.desktop' -exec chmod $verbose a+x {} + 13 | chgrp -R 0 "$var" && chmod -R $verbose a+rw "$var" && find "$var" -type d -exec chmod $verbose a+x {} + 14 | done -------------------------------------------------------------------------------- /src/common/scripts/chrome-init.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | VNC_RES_W=${VNC_RESOLUTION%x*} 6 | VNC_RES_H=${VNC_RESOLUTION#*x} 7 | 8 | echo -e "\n------------------ update chromium-browser.init ------------------" 9 | echo -e "\n... set window size $VNC_RES_W x $VNC_RES_H as chrome window size!\n" 10 | 11 | echo "export CHROMIUM_FLAGS='--no-sandbox --test-type --start-maximized --disable-gpu --disable-dev-shm-usage --user-data-dir --window-size=$VNC_RES_W,$VNC_RES_H --window-position=0,0'" > $HOME/.chromium-browser.init 12 | -------------------------------------------------------------------------------- /src/common/scripts/generate_container_user: -------------------------------------------------------------------------------- 1 | # Set current user in nss_wrapper 2 | USER_ID=$(id -u) 3 | GROUP_ID=$(id -g) 4 | echo "USER_ID: $USER_ID, GROUP_ID: $GROUP_ID" 5 | 6 | if [ x"$USER_ID" != x"0" ]; then 7 | 8 | NSS_WRAPPER_PASSWD=/tmp/passwd 9 | NSS_WRAPPER_GROUP=/etc/group 10 | 11 | cat /etc/passwd > $NSS_WRAPPER_PASSWD 12 | 13 | echo "default:x:${USER_ID}:${GROUP_ID}:Default Application User:${HOME}:/bin/bash" >> $NSS_WRAPPER_PASSWD 14 | 15 | export NSS_WRAPPER_PASSWD 16 | export NSS_WRAPPER_GROUP 17 | 18 | if [ -r /usr/lib/libnss_wrapper.so ]; then 19 | LD_PRELOAD=/usr/lib/libnss_wrapper.so 20 | elif [ -r /usr/lib64/libnss_wrapper.so ]; then 21 | LD_PRELOAD=/usr/lib64/libnss_wrapper.so 22 | elif [ -r /usr/lib/x86_64-linux-gnu/libnss_wrapper.so ]; then 23 | LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libnss_wrapper.so 24 | elif [ -r /usr/lib/aarch64-linux-gnu/libnss_wrapper.so ]; then 25 | LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libnss_wrapper.so 26 | else 27 | echo "no libnss_wrapper.so installed!" 28 | exit 1 29 | fi 30 | echo "nss_wrapper location: $LD_PRELOAD" 31 | export LD_PRELOAD 32 | fi 33 | -------------------------------------------------------------------------------- /src/common/scripts/vnc_startup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | ### every exit != 0 fails the script 3 | set -e 4 | 5 | ## print out help 6 | help (){ 7 | echo " 8 | USAGE: 9 | docker run -it -p 6901:6901 -p 5901:5901 consol/: