Skip to content
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

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:14.04
Copy link
Contributor

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.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Understood.

Copy link
Author

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 :(.

RUN apt-get update
RUN apt-get install -y curl software-properties-common build-essential git
RUN sudo add-apt-repository ppa:fkrull/deadsnakes && \
sudo apt-get update && \
sudo apt-get install -y python2.7 && \
ln -s /usr/bin/python2.7 /usr/bin/python
RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - && \
apt-get -y install nodejs
ADD . /hyperterm
VOLUME /hyperterm/dist
WORKDIR /hyperterm
RUN npm install
ENTRYPOINT npm run pack
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ If you want to build the binaries for all specified platforms, run the command:
$ npm run pack
```

Or use Docker if your system doesn't meet a dependency.
```bash
$ git clone https://github.com/zeit/hyperterm.git
$ cd hyperterm
$ docker build -t hyperterm .
$ docker run -v $(pwd)/dist:/hyperterm/dist hyperterm
```

After that, you'll see the binaries in the `./dist` folder!

## Related Repositories
Expand Down