title: How to run an electron app on docker
body: <p>I've created a fork of a repository hosting an electron app which is a chat client: <a href="https://github.com/Serkan-devel/BetterDiscordApp-docker" rel="noreferrer">https://github.com/Serkan-devel/BetterDiscordApp-docker</a>.</p>
  
  <p>What I'm trying to do is to create a docker container with a GUI hooked to the own screen like at <a href="https://blog.jessfraz.com/post/docker-containers-on-the-desktop/" rel="noreferrer">https://blog.jessfraz.com/post/docker-containers-on-the-desktop/</a> .</p>
  
  <p>The dockerfile I've created goes like:</p>
  
  <pre><code>FROM node:slim
  
  COPY . /usr/scr/app
  
  #RUN rm bdstart.sh
  
  RUN npm install --save-dev electron
  
  RUN npm install
  
  #ENV FRESHINSTALL=true
  
  CMD ["/usr/scr/app/start.sh"]
  </code></pre>
  
  <p>The start.sh file goes like:</p>
  
  <pre><code>./node_modules/.bin/electron ./src
  </code></pre>
  
  <p>After building the docker image and execute it with</p>
  
  <pre><code>docker run -it -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=unix$DISPLAY --device /dev/snd dixord
  </code></pre>
  
  <p>I get the error code:</p>
  
  <pre><code>standard_init_linux.go:175: exec user process caused "exec format error"
  </code></pre>
  
  <p>although I made the file executable and used the right amd64 architecture.</p>
  
  <p>Has anyone figured it out how to make electron GUI's naitively over docker work? </p>