{"id":18613488,"url":"https://github.com/kyzima-spb/docker-gui","last_synced_at":"2026-02-06T21:31:29.609Z","repository":{"id":39514335,"uuid":"506992096","full_name":"kyzima-spb/docker-gui","owner":"kyzima-spb","description":"The base image for running GUI applications in Docker","archived":false,"fork":false,"pushed_at":"2026-01-25T05:55:11.000Z","size":231,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-25T20:32:16.592Z","etag":null,"topics":["docker","docker-gui","s6-overlay"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/kyzimaspb/gui","language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kyzima-spb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-06-24T11:53:21.000Z","updated_at":"2025-12-06T22:25:51.000Z","dependencies_parsed_at":"2024-02-15T13:25:31.110Z","dependency_job_id":"f562f640-2eee-4b3e-83ff-a51a5dd34d0b","html_url":"https://github.com/kyzima-spb/docker-gui","commit_stats":{"total_commits":127,"total_committers":2,"mean_commits":63.5,"dds":0.07874015748031493,"last_synced_commit":"876998270b9f6def9228401b9239feff69073a88"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kyzima-spb/docker-gui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyzima-spb%2Fdocker-gui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyzima-spb%2Fdocker-gui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyzima-spb%2Fdocker-gui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyzima-spb%2Fdocker-gui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kyzima-spb","download_url":"https://codeload.github.com/kyzima-spb/docker-gui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kyzima-spb%2Fdocker-gui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29177421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T20:14:21.878Z","status":"ssl_error","status_checked_at":"2026-02-06T20:14:21.443Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-gui","s6-overlay"],"created_at":"2024-11-07T03:22:28.165Z","updated_at":"2026-02-06T21:31:29.593Z","avatar_url":"https://github.com/kyzima-spb.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-gui\n\n![preview](https://raw.githubusercontent.com/kyzima-spb/docker-gui/refs/heads/master/preview.png)\n\n**docker-gui** - is the base image for running GUI applications in Docker.\n\n---\n**NOTE**\n\nIt's a crazy idea to run GUI applications in Docker containers,\nbut sometimes there is no other way to run the application on the server\nor on the current OS.\n\n---\n\n- [How to create a new image?](#how-to-create-a-new-image)\n  - [Create image directory](#create-image-directory)\n  - [Create service](#create-service)\n  - [Dockerfile](#dockerfile)\n  - [Build](#build)\n  - [Run in daemon mode](#run-in-daemon-mode)\n- [Environment Variables](#environment-variables)\n  - [Autostart with a password](#autostart-with-a-password)\n  - [How to change user or group ID?](#how-to-change-user-or-group-id)\n- [Build Arguments](#build-arguments)\n  - [How to change Debian distribution release?](#how-to-change-debian-distribution-release)\n  - [How to change s6-overlay version?](#how-to-change-s6-overlay-version)\n  - [How to change s6-overlay architecture?](#how-to-change-s6-overlay-architecture)\n\n## How to create a new image?\n\nLet's look at an example of creating a new image to run the Chromium browser in Docker.\n\n### Create image directory\n\nCreate a new directory for the image files anywhere and go to it:\n\n```shell\n$ mkdir ~/docker-chromium\n$ cd ~/docker-chromium\n```\n\nNext, create a directory and file structure as shown below:\n\n```\n.\n├── Dockerfile\n└── root\n    └── etc\n        └── s6-overlay\n            └── s6-rc.d\n                ├── chromium\n                │   ├── dependencies\n                │   ├── run\n                │   └── type\n                └── user\n                    └── contents.d\n                        └── chromium\n```\n\nThe image uses the [s6-overlay][1] service manager.\nTherefore, to understand why each directory or file is needed,\nit is better to refer to the official documentation.\n\n### Create service\n\nThe file `./root/etc/s6-overlay/s6-rc.d/chromium/run`\ncontains the code to start the service (in the example browser).\nIt is recommended to use the [execline][2] language:\n\n```shell\n#!/command/execlineb -P\n\nwith-contenv\n\nbacktick -E HOME { homeof user }\ns6-env HOME=\"$HOME\"\n\nredirfd -w 2 /dev/null\n\ns6-setuidgid user chromium --no-sandbox --start-maximized\n```\n\nIn the `./root/etc/s6-overlay/s6-rc.d/chromium/type` file,\nspecify the type of service: `longrun` - starts at startup, if the service crashes,\nit will be restarted (the browser cannot be closed =)\n\n```\nlongrun\n```\n\nIn the `./root/etc/s6-overlay/s6-rc.d/chromium/dependencies` file,\nspecify the dependencies on other services (who should be started first),\none dependency per line:\n\n```\nopenbox\n```\n\nThe file `./root/etc/s6-overlay/s6-rc.d/user/contents.d/chromium` is empty,\nit is a link indicating that this service is enabled and should be started.\n\n### Dockerfile\n\nCreate a new Dockerfile and install the application\nwith all required dependencies, for example:\n\n```dockerfile\nFROM kyzimaspb/gui\n\nRUN --mount=type=cache,target=/var/cache/apt,sharing=locked \\\n    --mount=type=cache,target=/var/lib/apt,sharing=locked \\\n    rm -f /etc/apt/apt.conf.d/docker-clean; \\\n    echo 'Binary::apt::APT::Keep-Downloaded-Packages \"true\";' \u003e /etc/apt/apt.conf.d/keep-cache \\\n    \u0026\u0026 apt update \u0026\u0026 apt install -yq --no-install-recommends \\\n        chromium\n\nCOPY ./ /\n```\n\n### Build\n\nBuild an image file named `chromium`:\n\n```shell\n$ docker build -t chromium -f Dockerfile ./root\n```\n\n### Run in daemon mode\n\nRun the container named `chromium_1` in daemon mode\nand forward the specified ports\nto the specified ports of the host machine:\n\n```shell\n$ docker run -d --name chromium_1 \\\n      -p 5900:5900 \\\n      --shm-size 2g \\\n      chromium\n```\n\nForwarded ports:\n\n* `5900` - TCP port for connecting VNC clients;\n\nStop a running container:\n\n```shell\n$ docker stop chromium_1\n```\n\n## Environment Variables\n\n* `XVFB_RESOLUTION` - screen resolution of the virtual X server, by default `1280x720`\n* `VNC_SERVER_PASSWORD` - password for the VNC server, by default not set\n* `VNC_SERVER_PASSWORD_FILE` - password for the VNC server, by default not set\n* `USER_UID` - user ID, by default is `1000`\n* `USER_GID` - user's group ID, by default is `1000`\n\n### Autostart with a password\n\nAutomatically start the container at system startup\nwith the password `qwe123` to connect to the VNC server:\n\n```shell\n$ docker run -d --name chromium_1 \\\n      -p 5900:5900 \\\n      --shm-size 2g \\\n      -e VNC_SERVER_PASSWORD=qwe123 \\\n      --restart unless-stopped \\\n      chromium\n```\n\nExample with secrets in Docker Compose:\n\n```yml\nsecrets:\n  vnc_password:\n    file: ./secrets/vnc_password\n\nservices:\n  chromium:\n    build:\n      context: ./root\n      dockerfile: ../Dockerfile\n    secrets:\n      - vnc_password\n    ports:\n      - \"5900:5900\"\n    environment:\n      VNC_SERVER_PASSWORD_FILE: /run/secrets/vnc_password\n    restart: unless-stopped\n```\n\nBuilding the project and running:\n\n```shell\n$ docker compose --project-directory ./examples/chromium build\n$ docker compose --project-directory ./examples/chromium up\n```\n\n### How to change user or group ID?\n\n```shell\n$ docker run -d --name chromium_1 \\\n      -p 5900:5900 \\\n      --shm-size 2g \\\n      -e USER_UID=1001 \\\n      -e USER_GID=1001 \\\n      --restart unless-stopped \\\n      chromium\n```\n\nThe source code for the example is available in the `examples/chromium` directory.\n\n\n## Build Arguments\n\n* `RELEASE` - The release name of the Debian distribution.\n  Available values are `bookworm-slim`, `bookworm`, `bullseye-slim`, `bullseye`,\n  `buster-slim`, `buster`.\n  The default is `bookworm-slim`.\n* `S6_DOWNLOAD_URL` - Download URL for [s6-overlay][1].\n  The default is `https://github.com/just-containers/s6-overlay/releases/download`.\n* `S6_OVERLAY_VERSION` - [s6-overlay][1] version.\n  By default, the latest version.\n* `S6_ARCH` - [s6-overlay][1] architecture.\n  The default is `x86_64`.\n\n### How to change Debian distribution release?\n\nThe `RELEASE` build argument allows you to specify the release of the Debian distribution:\n\n```shell\n$ git clone https://github.com/kyzima-spb/docker-gui.git\n$ cd docker-gui/docker\n$ docker build -t gui \\\n    --build-arg RELEASE=bullseye \\\n    -f Dockerfile ./root\n```\n\n### How to change s6-overlay version?\n\n```shell\n$ git clone https://github.com/kyzima-spb/docker-gui.git\n$ cd docker-gui/docker\n$ docker build -t gui \\\n    --build-arg S6_OVERLAY_VERSION=3.1.2.0 \\\n    -f Dockerfile ./root\n```\n\n### How to change s6-overlay architecture?\n\nWe clone the sources of the base image,\nspecify the architecture in the `S6_ARCH` argument\nand optionally the version in the `S6_OVERLAY_VERSION` argument.\nThe available values for the selected version can be found on the [downloads page][3].\n\nBuild an image, for example, for Orange Pi:\n\n```shell\n$ git clone https://github.com/kyzima-spb/docker-gui.git\n$ cd docker-gui/docker\n$ docker build -t gui \\\n    --build-arg S6_ARCH=armhf .\n    -f Dockerfile ./root\n```\n\n[1]: \u003chttps://github.com/just-containers/s6-overlay\u003e \"s6-overlay\"\n[2]: \u003chttps://skarnet.org/software/execline/\u003e \"execline\"\n[3]: \u003chttps://github.com/just-containers/s6-overlay/releases\u003e \"releases\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyzima-spb%2Fdocker-gui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkyzima-spb%2Fdocker-gui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkyzima-spb%2Fdocker-gui/lists"}