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.

Building for Windows on MacOS using Docker container

See original GitHub issue
  • Version: 7.18.0
  • Target: Windows 64

I’m trying to build for Windows from my macOS using the Docker container provided (electronuserland/electron-builder:wine). Everthing works great building for Linux, but when I tried to build for Windows, throw an error:

Error: Exit code: 1. Command failed: wine /root/.cache/winCodeSign/winCodeSign-1.4.2/rcedit.exe /p243ab633605af455374aa646db1a63110697917109902f0022d6b29e469f4e07 (sha256 hash) --set-version-string CompanyName ACME --set-version-string FileDescription ACME --set-version-string ProductName ACME --set-version-string InternalName ACME --set-version-string LegalCopyright Copyright © 2016 ACME --set-version-string OriginalFilename  --set-file-version 1.0.0 --set-product-version 1.0.0 --set-icon /project/build/icon.ico
err:virtual:NtMapViewOfSection map_file_into_view 0x4e0000 53f1000 000000000 failed
Fatal error: Unable to commit changes
err:virtual:NtMapViewOfSection map_file_into_view 0x4e0000 53f1000 000000000 failed
Fatal error: Unable to commit changes
at /project/node_modules/electron-builder/src/util/util.ts:107:16
at ChildProcess.exithandler (child_process.js:218:5)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Socket.<anonymous> (internal/child_process.js:334:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:501:12)
From previous event:
at exec (/project/node_modules/electron-builder/src/util/util.ts:85:3)
at /project/node_modules/electron-builder/src/winPackager.ts:170:11
From previous event:
at WinPackager.signAndEditResources (/project/node_modules/electron-builder/out/winPackager.js:239:11)
at /project/node_modules/electron-builder/src/winPackager.ts:178:16
From previous event:
at WinPackager.postInitApp (/project/node_modules/electron-builder/out/winPackager.js:248:11)
at /project/node_modules/electron-builder/src/platformPackager.ts:243:26
From previous event:
at /project/node_modules/electron-builder/src/packager/dirPackager.ts:58:11
at Generator.next (<anonymous>)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
From previous event:
at pack (/project/node_modules/electron-builder/out/packager/dirPackager.js:43:21)
at /project/node_modules/electron-builder/src/platformPackager.ts:185:11
at Generator.next (<anonymous>)
From previous event:
at WinPackager.doPack (/project/node_modules/electron-builder/out/platformPackager.js:302:11)
at /project/node_modules/electron-builder/src/winPackager.ts:119:16
at Generator.next (<anonymous>)
From previous event:
at WinPackager.pack (/project/node_modules/electron-builder/out/winPackager.js:192:11)
at /project/node_modules/electron-builder/src/packager.ts:134:22
From previous event:
at Packager.doBuild (/project/node_modules/electron-builder/out/packager.js:254:11)
at /project/node_modules/electron-builder/src/packager.ts:102:32
at Generator.next (<anonymous>)
at runCallback (timers.js:637:20)
at tryOnImmediate (timers.js:610:5)
at processImmediate [as _immediateCallback] (timers.js:582:5)
From previous event:
at Packager.build (/project/node_modules/electron-builder/out/packager.js:206:11)
at /project/node_modules/electron-builder/src/builder.ts:234:33
at Generator.next (<anonymous>)
From previous event:
at build (/project/node_modules/electron-builder/out/builder.js:81:21)
at Object.<anonymous> (/project/node_modules/electron-builder/out/build-cli.js:66:41)
at Module._compile (module.js:573:32)
at Object.Module._extensions..js (module.js:582:10)
at Module.load (module.js:490:32)
at tryModuleLoad (module.js:449:12)
at Function.Module._load (module.js:441:3)
at Module.runMain (module.js:607:10)
at run (bootstrap_node.js:382:7)
at startup (bootstrap_node.js:137:9)
at bootstrap_node.js:497:3

The steps to run the container and build are these:

  1. Run: docker run --rm -ti -v /my/folder/project:/project -v ~/.electron:/root/.electron electronuserland/electron-builder:wine /bin/bash
  2. Run inside the container: npm run build:win64 (equals to build --win --x64)

Am I doing something wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
develarcommented, Nov 3, 2016

How did you install Docker? Parallels and VMWare are broken. Please use only latest official Docker for mac (https://docs.docker.com/engine/installation/mac/#/docker-for-mac). Please do not use Docker Toolbox.

0reactions
saenzramirocommented, Nov 3, 2016

Thank you so much for your help and this tool.

Read more comments on GitHub >

github_iconTop Results From Across the Web

macos - How can I run a docker windows container on osx?
Docker has added some labs that show all the ways to setup to use Windows Containers. The only way to do it on...
Read more >
How do I start a Windows-Docker-Container on my Mac OS X?
boot2docker hosts Linux-Docker-Container on Windows, Linux and Mac OS X systems e.g. by using virtualbox; Windows Server 2016 TP 5 provides ...
Read more >
StefanScherer/windows-docker-machine: Work with ... - GitHub
This Vagrant environment creates a "Docker Machine" to work on your MacBook with Windows containers. You can easily switch between Docker Desktop Linux ......
Read more >
macOS VM on Linux & Windows using Docker-OSX - YouTube
How to use Docker - OSX running macOS VM on Linux.This is a video tutorial to accompany the GitHub repository.
Read more >
Docker on Mac | Run Windows Core Server - Reddit
Want to run Windows PowerShell in Docker Container, on mac book. ... a command that i can use to switch runtime on Docker...
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