{"id":15650288,"url":"https://github.com/dmotte/desktainer","last_synced_at":"2025-04-14T07:08:20.719Z","repository":{"id":44594947,"uuid":"355011107","full_name":"dmotte/desktainer","owner":"dmotte","description":"🖥 Remote desktop in a container","archived":false,"fork":false,"pushed_at":"2025-01-04T03:05:47.000Z","size":834,"stargazers_count":39,"open_issues_count":1,"forks_count":11,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-14T07:08:15.485Z","etag":null,"topics":["arm","browser","container","debian","desktainer","desktop","docker","docker-compose","http","lxde","novnc","remote","remote-desktop","supervisor","supervisord","vnc","webapp","websockify","x11","x11vnc"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/dmotte/desktainer","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dmotte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2021-04-06T00:36:41.000Z","updated_at":"2025-01-04T03:05:33.000Z","dependencies_parsed_at":"2023-12-08T15:07:00.787Z","dependency_job_id":"d4378010-74ec-426b-a446-6411baabaa9e","html_url":"https://github.com/dmotte/desktainer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotte%2Fdesktainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotte%2Fdesktainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotte%2Fdesktainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dmotte%2Fdesktainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dmotte","download_url":"https://codeload.github.com/dmotte/desktainer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837280,"owners_count":21169374,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["arm","browser","container","debian","desktainer","desktop","docker","docker-compose","http","lxde","novnc","remote","remote-desktop","supervisor","supervisord","vnc","webapp","websockify","x11","x11vnc"],"created_at":"2024-10-03T12:34:10.876Z","updated_at":"2025-04-14T07:08:20.696Z","avatar_url":"https://github.com/dmotte.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# desktainer\n\n![icon](icon-128.png)\n\n[![GitHub main workflow](https://img.shields.io/github/actions/workflow/status/dmotte/desktainer/main.yml?branch=main\u0026logo=github\u0026label=main\u0026style=flat-square)](https://github.com/dmotte/desktainer/actions)\n[![Docker Pulls](https://img.shields.io/docker/pulls/dmotte/desktainer?logo=docker\u0026style=flat-square)](https://hub.docker.com/r/dmotte/desktainer)\n\n:computer: Remote **desk**top in a con**tainer**.\n\n\u003e :package: This image is also on **Docker Hub** as [`dmotte/desktainer`](https://hub.docker.com/r/dmotte/desktainer) and runs on **several architectures** (e.g. amd64, arm64, ...). To see the full list of supported platforms, please refer to the [`.github/workflows/main.yml`](.github/workflows/main.yml) file. If you need an architecture which is currently unsupported, feel free to open an issue.\n\nThanks to [fcwu/docker-ubuntu-vnc-desktop](https://github.com/fcwu/docker-ubuntu-vnc-desktop) and [soffchen/tiny-remote-desktop](https://github.com/soffchen/tiny-remote-desktop) for the inspiration.\n\n## Simple usage\n\nThe simplest way to try this image is:\n\n```bash\ndocker run -it --rm -p6901:6901 dmotte/desktainer\n```\n\n\u003e **Note**: since some GUI applications may have issues with Docker's default _seccomp_ profile, you may need to use `--security-opt seccomp=unconfined`\n\nThen head over to http://localhost:6901/ to access the remote desktop.\n\n![Screenshot](screen-01.png)\n\n## Standard usage\n\nThe [`docker-compose.yml`](docker-compose.yml) file contains a complete usage example for this image. Feel free to simplify it and adapt it to your needs. Unless you want to build the image from scratch, comment out the `build: build` line to use the pre-built one from _Docker Hub_ instead.\n\nTo start the Docker-Compose stack in daemon (detached) mode:\n\n```bash\ndocker-compose up -d\n```\n\nThen you can view the logs using this command:\n\n```bash\ndocker-compose logs -ft\n```\n\n## Tips\n\n- :bulb: If you want to **change the resolution** while the container is running, you can use the `xrandr --fb 1024x768` command. The new resolution cannot be larger than the one specified in the `RESOLUTION` environment variable though\n- :bulb: If you need to, you can extend this project by making your own `Dockerfile` starting from this image (i.e. `FROM dmotte/desktainer`) and/or mount custom _supervisor_ configuration files. See the [`example`](example) folder for an example of how to do it\n- :bulb: This image is not meant to be run with the `--user` Docker option, because the [`startup.sh`](build/startup.sh) script needs to run as root in the initial phase. Moreover, the user created via the `MAINUSER_NAME` environment variable (see below) will be a **sudoer**, so running the container as root is useful in any case. If you want a **rootless** version of this image, check out [dmotte/desktainer-rootless](https://github.com/dmotte/desktainer-rootless)\n\n## Running commands at container startup\n\nIf you need to run commands at container startup, you can create Bash scripts in the following locations:\n\n- `/opt/startup-early/*.sh`: these scripts will be included in alphabetical order **before** the main container initialization process\n- `/opt/startup-late/*.sh`: these scripts will be included in alphabetical order **after** the main container initialization process\n\nSee the [`startup.sh`](build/startup.sh) script for more details.\n\nMoreover, if you need to run commands after the LXDE startup, you can create launcher files in the `/etc/xdg/autostart` or the `~/.config/autostart` directory.\n\n## Environment variables\n\nList of supported **environment variables**:\n\n| Variable              | Required                 | Description                                                                                     |\n| --------------------- | ------------------------ | ----------------------------------------------------------------------------------------------- |\n| `RESOLUTION`          | No (default: 1920x1080)  | Screen resolution                                                                               |\n| `MAINUSER_NAME`       | No (default: mainuser)   | Name of the main user. If set to `root`, no user will be created and the main user will be root |\n| `MAINUSER_PASS`       | No (default: `mainuser`) | Password of the main user (if `MAINUSER_NAME != root`)                                          |\n| `MAINUSER_NOPASSWORD` | No (default: `false`)    | Whether or not the main user should be allowed to `sudo` without password                       |\n| `VNC_PASS`            | No (default: none)       | Password for the VNC server                                                                     |\n| `VNC_PORT`            | No (default: 5901)       | TCP port of the VNC server                                                                      |\n| `NOVNC_PORT`          | No (default: 6901)       | TCP port of the noVNC webserver                                                                 |\n\n## Development\n\nIf you want to contribute to this project, you can use the following one-liner to **rebuild the image** and bring up the **Docker-Compose stack** every time you make a change to the code:\n\n```bash\ndocker-compose down \u0026\u0026 docker-compose up --build\n```\n\n\u003e **Note**: I know that this Docker image has many **layers**, but this shouldn't be a problem in most cases. If you want to reduce its number of layers, there are several techniques out there, e.g. see [this](https://stackoverflow.com/questions/39695031/how-make-docker-layer-to-single-layer)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmotte%2Fdesktainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdmotte%2Fdesktainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdmotte%2Fdesktainer/lists"}