-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 a Dockerfile for easy builds #615
Add a Dockerfile for easy builds #615
Conversation
I have Python 2.7.10 on my OS X machine, FYI |
Why would you want to build it as a OS X user using Docker? |
I don't understand the python problem. Where are we using python? Is it one of our deps? |
@dj-hedgehog I think I see what you are saying. Is it "If you build hyperterm in a Linux environment, it will only result in a build of hyperterm that works only for Linux ". Is that right? That's not the case when creating executables for platforms using tools like Cordova. Is it always the case that with Electron you can only build apps for the platform you are building from? |
Our build process works on Linux, Windows and OSX. |
@TooTallNate Looks like I'm on Python 3.5.1.
@rauchg Here's a log containing a bunch of errors around python when I try
The question is not "Can we perform a build on X platform?" but more like "Can we do a build on X platform that produces an executable on Y platform?" In this case it's "Can we do a build in Ubuntu that produces and executable for Mac?" If so, then we can reliably build Hyperterm for Mac from a Mac that has Docker for Mac installed. |
@rjsteinert Seem pretty much an issue with support of node-gyp. |
@@ -0,0 +1,10 @@ | |||
FROM ubuntu:14.04 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend (alpine-node](https://hub.docker.com/r/mhart/alpine-node/). Images are way smaller.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, Node.js compiled against glibc isn't officially (upstream) supported on a musl-based system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Understood.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fearphage I think the last time I tried to base an image on alpine I gave up because of a lack of package manager. Also, cool tip on the using ADD
instead of curl
! Unfortunately I rebase my last commit to this in and it looks like it blew away your comment on what you suggested. I'm surprised Github even removed it from the flow of this comments on this PR :(.
@rjsteinert Python 3 isn't supported by Node.js (through gyp). I wouldn't necessarily call this a hyperterm-related issue seeing how you will run into the same problem on any system using Python 3 and Node.js. There's "somewhat" progress here but I don't think one should expect py3 support in gyp anytime soon. |
ed3b4db
to
a7d8edc
Compare
Woohoo! This works now as described in my change to the README. Only problem is, as @dj-hedgehog alluded to, all I have generated is an executable for Linux when I'm ultimately trying to generate an executable for Mac. So this is a reliable way for generating the Linux version of Hyperterm on either Mac or Linux without having to modify your python version but not yet a way to reliably generate the Mac version. As I mentioned before, tools like Cordova allow you to compile for more than one "platform" as they call it. I wonder if we can do the same so that your Linux container can produce the Mac |
@rjsteinert, does this provide any insight for you? https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build |
Possible to try this? https://github.com/electron-userland/electron-packager . I am not fully successfull with it however, the build works perfectly (I can build from linux docker container for macOS) however when I try to run it, I get this. I'm guessing this has to do with If someone else gets this to work, however it may be, using Docker, please comment here :) |
I think this is a lot of work for limited effect. Like it was mentioned, this only gets you a Linux build. The only way to get all the builds right is to rely on the travis matrix. I appreciate the work, but ultimately I'd like one less thing to maintain. |
My Mac doesn't meet the dependencies for building this. I'm getting some complaint about my version of Python. I don't really want to mod my Mac for every project's own unique needs these days so I use Dockerfiles as build machines so the build can happen in a container. This is is nice for documenting the requirements for building, documenting the the process for building, and lastly for consistency of builds not to mention avoiding the "Oh shit we lost Bob's laptop, now we can't compile, we have to shut the project down" problem.
Now the only dependency is Docker so we can do a build like...
The result is the same. You'll find a
dist
folder in your hyperterm directory on your host machine with the builds that happened inside the container.... of course, the result of this still complains about missing Python so the build fails. Can someone solve this? I don't know what version of Python this project requires. Bob does.