From 177daf57fb137a775d74ff8de368e5c6374c4352 Mon Sep 17 00:00:00 2001 From: "R.J. Steinert" Date: Fri, 12 Aug 2016 14:04:03 -0400 Subject: [PATCH 1/3] Add a Dockerfile --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000000..12f13d712c68 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:14.04 +RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - +RUN apt-get -y install nodejs +ADD . /hyperterm +VOLUME /hyperterm/dist +WORKDIR /hyperterm +RUN npm install +ENTRYPOINT npm run pack From 031856316eda5cf1c237899d5ad4856ae173b14e Mon Sep 17 00:00:00 2001 From: rjsteinert Date: Wed, 24 Aug 2016 08:30:17 -0400 Subject: [PATCH 2/3] Install more dependencies during docker build for things like make, git, and python2.7 --- Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 12f13d712c68..44af9407526e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,12 @@ FROM ubuntu:14.04 -RUN curl -sL https://deb.nodesource.com/setup_4.x | bash - -RUN apt-get -y install nodejs +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 From a7d8edc785d4e50c8948c2da29dc2d9b2e8cebe9 Mon Sep 17 00:00:00 2001 From: "R.J. Steinert" Date: Fri, 12 Aug 2016 15:12:30 -0400 Subject: [PATCH 3/3] Add docs on how to build using Docker --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index f38b91415425..a40611c8e2fe 100644 --- a/README.md +++ b/README.md @@ -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