question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem when running electron-packager within Docker container

See original GitHub issue

I’m experiencing weird issues with using electron-packager@5.1.1 within a container. The container is executed

docker run -v $(pwd):/tmp/w -w /tmp/w node:4.2.2-wheezy ./build.sh

where the project directory is attached as a volume and the build script execution is passed as an argument to the container.

The base image is node:4.2.2-wheezy, which means the environment inside the container is Debian Wheezy.

The electron-packager is executed through npm like this:

electron-packager . $npm_package_productName --out=dist --ignore='^/dist$' --prune --asar --overwrite --platform=darwin,win32 --arch=all --version=$npm_package_electronVersion

Now, the problem is the execution suddenly hangs after executing the electron-packager and apparently nothing is happening. After 15-20mins the execution goes further:

Downloading electron-v0.34.2-win32-ia32.zip
[>                                            ] 0.0% (0 B/s)
Downloading electron-v0.34.2-win32-ia32.zip
[>                                            ] 0.0% of 40.03 MB (0 B/s)
Downloading electron-v0.34.2-win32-ia32.zip
[=============>                               ] 32.3% of 40.03 MB (12.95 MB/s)
Downloading electron-v0.34.2-win32-ia32.zip
[=============================>               ] 68.1% of 40.03 MB (27.24 MB/s)
Downloading electron-v0.34.2-win32-ia32.zip
[============================================>] 100.0% of 40.03 MB (32.03 MB/s)
Downloading electron-v0.34.2-win32-ia32.zip
[============================================>] 100.0% of 40.03 MB (32.03 MB/s)
Downloading electron-v0.34.2-win32-ia32.zip
[============================================>] 100.0% of 40.03 MB (32.03 MB/s)
Packaging app for platform win32 ia32 using electron v0.34.2

Then again the execution halts at Packaging app for platform win32 ia32 using electron v0.34.2 and after another 20mins npm goes on, however with no artifacts produced in the dist folder and no packaging for darwin platform or for win64.

This is happening for me on my Macbook Pro and our build server using different version of Docker.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Iliyasscommented, Oct 27, 2016

i had the same issue, I just ignored electron-packager and it works, add --ignore=electron-packager

1reaction
byFcommented, Feb 10, 2016

@madebysid we ended up putting into the container as few files as possible. That fixed the recursion issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Develop Electron in Docker - TRIGO GmbH
Why. There are several reasons to develop in Docker and not on your host machine. First, when it comes to backend services, ...
Read more >
Use Docker container to build windows installers for electron ...
The first command will configure some stuff and run an electron-packager to generate a package in the build folder, ...
Read more >
Docker and electron-builder keep building for linux but I want ...
I am using Docker to build an Electron package (with Quasar) on my Mac. I need it to be built for Windows. I...
Read more >
How to run Electron on Linux on Docker on Mac - Jake Donham
The file in question is part of a native library I'm using, NSFW, and the error comes up while electron-forge is running electron-rebuild...
Read more >
electron-builder
A complete solution to package and build a ready for distribution Electron app ... Docker images to build Electron app for Linux or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found