{"id":17793422,"url":"https://github.com/raymondev/electrondocker","last_synced_at":"2026-04-10T15:07:29.458Z","repository":{"id":259400664,"uuid":"861721240","full_name":"RaymonDev/ElectronDocker","owner":"RaymonDev","description":"Dockerfile and associated files to deploy a Three.js user interface within an Electron application running in a Docker container","archived":false,"fork":false,"pushed_at":"2024-11-22T07:32:52.000Z","size":20,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T02:18:26.008Z","etag":null,"topics":["docker","dockerfile","dockerfiles-linux","electron","electron-app","linux","node-js","nodejs","three-js","threejs","threejs-example"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/RaymonDev.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}},"created_at":"2024-09-23T12:06:08.000Z","updated_at":"2024-11-22T07:32:56.000Z","dependencies_parsed_at":"2025-02-07T17:26:23.319Z","dependency_job_id":null,"html_url":"https://github.com/RaymonDev/ElectronDocker","commit_stats":null,"previous_names":["raymondev/electrondocker"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaymonDev%2FElectronDocker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaymonDev%2FElectronDocker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaymonDev%2FElectronDocker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RaymonDev%2FElectronDocker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RaymonDev","download_url":"https://codeload.github.com/RaymonDev/ElectronDocker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741117,"owners_count":20826067,"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":["docker","dockerfile","dockerfiles-linux","electron","electron-app","linux","node-js","nodejs","three-js","threejs","threejs-example"],"created_at":"2024-10-27T11:08:41.673Z","updated_at":"2025-12-30T21:47:55.604Z","avatar_url":"https://github.com/RaymonDev.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ElectronDocker\nThis guide explains how to run an Electron application inside a Docker container using Ubuntu and have the UI rendered on the host machine. The UI utilizes Three.js for rendering 3D graphics.\n\n\n## Prerequisites\n\n- Docker installed on the host machine.\n- X11 forwarding enabled on the host machine (for UI projection).\n- An Electron app that is ready to be run using `npm start`.\n\n## Steps\n\n### 1. Build the Docker Image\n\nFirst, ensure you have the following `Dockerfile` in your project directory:\n\n```Dockerfile\nFROM ubuntu:20.04\n\n# Configure timezone and environmenFROM ubuntu:20.04\n\n# Set environment variables to avoid interactive configuration of tzdata\nENV DEBIAN_FRONTEND=noninteractive \\\n    TZ=America/Los_Angeles\n\n# Install Node.js, NPM, and additional dependencies needed for Electron\nRUN apt-get update \u0026\u0026 apt-get install -y \\\n    tzdata \\\n    curl \\\n    libx11-dev \\\n    libxext-dev \\\n    libxrender-dev \\\n    libxtst-dev \\\n    libxrandr-dev \\\n    libasound2-dev \\\n    libgtk-3-dev \\\n    libnss3 \\\n    libxss1 \\\n    libatk-bridge2.0-0 \\\n    libdrm2 \\\n    libgbm1 \\\n    git \\\n    \u0026\u0026 apt-get clean\n\n# Install Node.js 18.x (compatible with Electron 32.x)\nRUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - \u0026\u0026 \\\n    apt-get install -y nodejs\n\n# Set the working directory to /app inside the container\nWORKDIR /app\n\n# Copy all files from the host to the /app folder in the container\nCOPY appw /app\n\n# Install application dependencies\nRUN npm install\n\n# Command to run the Electron application using npm start\nCMD [\"npm\", \"start\"]\n```\n\nBuild the Docker image with the following command:\n\n```bash\n\ndocker build -t electron-app .\n```\n### 2. Allow Display Forwarding\n\nTo allow the Docker container to connect to your display, run:\n\n```bash\n\nxhost +local:docker\n```\n\n### 3. Run the Docker Container\n\nOnce the image is built, you can run the Docker container using the following command:\n\n```bash\n\ndocker run --rm -it \\\n    --env=\"DISPLAY\" \\\n    --env=\"XAUTHORITY=$XAUTH\" \\\n    --volume=\"/tmp/.X11-unix:/tmp/.X11-unix:rw\" \\\n    electron-app\n```\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraymondev%2Felectrondocker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraymondev%2Felectrondocker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraymondev%2Felectrondocker/lists"}