Skip to content

Instantly share code, notes, and snippets.

@anaisbetts
Created February 11, 2016 07:38
Show Gist options
  • Save anaisbetts/c3bb783cf45a13fd1e6e to your computer and use it in GitHub Desktop.
Save anaisbetts/c3bb783cf45a13fd1e6e to your computer and use it in GitHub Desktop.
Docker + Surf + Electron
# VERSION: 0.1
# DESCRIPTION: Build an Electron app in a container
# AUTHOR: Paul Betts <[email protected]>
# COMMENTS:
# Use Surf to build an Electron app in a container and upload the result
# Originally based on the Atom Dockerfile by Jessica
# Frazelle <[email protected]>
# USAGE:
# # Download atom Dockerfile
# wget https://raw.githubusercontent.com/atom/atom/master/Dockerfile
#
# # Build atom image
# docker build -t surfBuild .
#
# docker run surfBuild
#
#DOCKER-VERSION 1.3
# Base docker image
FROM ubuntu:trusty
MAINTAINER Paul Betts <[email protected]>
ENV GITHUB_TOKEN=FILL_THIS_IN
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
ca-certificates \
curl \
git \
fakeroot \
clang \
libgnome-keyring-dev \
libnss3 \
libgtk2.0-dev \
libnotify-dev \
libdbus-1-dev \
libxrandr-dev \
libxext-dev \
libxss-dev \
libgconf2-dev \
libasound2-dev \
libcap-dev \
libcups2-dev \
libXtst-dev \
wget \
--no-install-recommends
# install node
RUN wget http://nodejs.org/dist/v5.5.0/node-v5.5.0.tar.gz && tar zxvf node-v5.5.0.tar.gz && cd node-v5.5.0 && ./configure --prefix=/usr && make && make install
# node-git silliness
RUN apt-get install -y software-properties-common --no-install-recommends
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
RUN apt-get update
RUN apt-get install -y libstdc++-4.9-dev --no-install-recommends
RUN npm install -g [email protected]
CMD surf-build --repo https://github.com/USER/REPO -n surf-debian-x64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment