Dockerized Electron build

Last year, I had a requirement to build an electron app inside a docker container. I wrote this Dockerfile for that. I built this docker image and pushed it to our AWS container registry. Whenever there is a build, the jenkin job pull this image and add code into this image and build the exe file and upload it to an s3 bucket

FROM ubuntu:16.04
MAINTAINER Alvin Jaison “alvin.jaison@iinerds.com

RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -y wget
RUN apt-get install -y unzip
RUN apt-get install -y software-properties-common
RUN apt-get install -y python-software-properties

RUN curl -sL https://deb.nodesource.com/setup_6.x | /bin/sh
RUN apt-get install -y nodejs
RUN dpkg –add-architecture i386
RUN apt-get update
RUN wget -nc https://dl.winehq.org/wine-builds/Release.key
RUN apt-key add Release.key
RUN apt-add-repository https://dl.winehq.org/wine-builds/ubuntu/
RUN apt-get update
RUN apt-get install –install-recommends winehq-stable -y

RUN apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv-keys XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
RUN echo “deb http://download.mono-project.com/repo/ubuntu xenial main” | tee /etc/apt/sources.list.d/mono-official.list
RUN apt-get update
RUN apt-get install -y mono-devel

RUN npm install -g -y npm@5.3.0
RUN npm install -g -y electron-packager@9.1.0

Post navigation

Alvin Jaison

Myself Alvin Jaison. I'm a DevOps Engineer by Profession; A Mountaineer by Passion. I started this website to share DevOps related posts. Post your suggestions as a comment. You can reach me @ alvinjaison@outlook.com

Leave a Reply

Your email address will not be published. Required fields are marked *