Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
Electron inside Docker with X11 Forwarding - No Protocol Specified

I am attempting to run the Electron Quick Start in a Docker container with X11 forwarding. I've got all the appropriate packages figured out but when I run the container I get No protocol specified. I'm not sure what I'm missing to get it to work.

Dockerfile

FROM node

RUN apt-get update
RUN apt-get -y install libgtkextra-dev libgconf2-dev libnss3 libasound2 libxtst-dev libxss1 libx11-xcb-dev

WORKDIR /srv
ADD . .

RUN npm install
ENTRYPOINT ["npm", "start"]

Build and Run

docker build -t electron .
docker run -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY electron

Output

npm info it worked if it ends with ok
npm info using npm@4.1.2
npm info using node@v7.7.2
npm info lifecycle electron-quick-start@1.0.0~prestart: electron-quick-start@1.0.0
npm info lifecycle electron-quick-start@1.0.0~start: electron-quick-start@1.0.0

> electron-quick-start@1.0.0 start /srv
> electron .

No protocol specified

npm info lifecycle electron-quick-start@1.0.0~start: Failed to exec start script
npm ERR! Linux 4.8.0-41-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.7.2
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! electron-quick-start@1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the electron-quick-start@1.0.0 start script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the electron-quick-start package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs electron-quick-start
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls electron-quick-start
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /srv/npm-debug.log

Q: What is the correct way of running Electron apps inside Docker?


about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In your host machine run xhost local:root then try running your container to run electron

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!