-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Dockerfile for Windows and Linux builds #1765
Conversation
@IsmayilMirzali hm, I am thinking maybe it's better to just split it to 2 dockerfiles, one for each OS? Because we anyway will need third one for Mac OS and we can't keep it in the same file you have now ;) What you think? |
@evereq Can definitely do that. Do we want seperate directories for each? (Maybe |
@IsmayilMirzali maybe like |
@evereq Done. Just side note, we wouldn't be able to use a Docker image for MacOS, since such an image doesn't really exist without some tricks with |
@IsmayilMirzali hm, I am not sure understand it... I.e. why can't we have a similar Dockerfile like Linux one you did already, which will be just running in Docker on Mac and it will be able to build Electron app which targets Mac Os? Using for example |
Also please see https://www.electron.build/multi-platform-build, it includes sample travis.yml which actually use osx image to build for Mac Os, seems they do it without docker at all, so maybe we don't even need it... But still, I would like to have |
@evereq Travis builds on a mac machine, image in that context is different than a docker image. (My plan was to just have TravisCI build the Mac app on a mac machine)The reason you cant have a Dockerfile on Mac that would build for Mac is because Docker on Mac is essentially a virtual machine to host a linux kernel so you can use Docker. (Docker heavily relies on |
Hm, of course, I know most of that, but I don't think you understand me. I.e. can person run Docker on Mac? Of course! Can we create Dockerfile which will be used by that person to build Electron app for Mac Os? I think YES. And it's exactly what we need. We are NOT going to run such Dockerfile on Jenkins for example because we don't have Mac Servers where we can run agent so it builds on Mac OS. But we don't need to do that. All we want is to provide to some customers of Gauzy who happen to use Macbook to be able to easy build our Gauzy Desktop app.... |
Obviously they can run our Dockerfiles on Mac and build them, for windows and linux but not Mac. Because once the build happens inside Docker, they're essentially out of scope of the Mac host. (because they're inside a VM, on Mac docker runs on a VM) The reason you can build for windows is because the build happens in a Linux container that has |
Well, can you check https://medium.com/@calbertts/developing-electron-apps-in-macos-afd21b4a59e3? It said (it's in 2017):
So I thought maybe to be able to just build (and run if needed) Electron Desktop app in the docker you can install some "tools" and it will work? The reason I thought it should be possible is that because Electron apps are essentially a Chromium / Node etc and it might not really need full Mac hardware to build such apps (and even to run them). Could be however for signing we will still need Mac haha, but in this case, we will have Travis / Circle, etc. If some developer wants to build/run Gauzy for testing, he may not need to sign it on Mac. Hope you understand what I mean... So just to summarize: yes, we will not be able to build "Native" Mac OS apps in Docker probably, but Electron apps, maybe it's much more simple because of "limited" access to Mac-specific hardware features, etc? I don't have time to research all that and it's not my focus :) |
That article is very similar to X11 forwarding, essentially, they still have a Linux Docker container, but they can run the electron app inside the container but interact with it on the host using |
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.