blob: f46aea47a3099f7904d6ec73141aafd745b24617 [file] [log] [blame]
Jessica Frazellea68d9832015-10-06 17:57:52 -07001# DESCRIPTION: Create the atom editor in a container
Jess Frazellec4ff0cf2016-09-19 15:25:05 -07002# AUTHOR: Jessie Frazelle <jess@linux.com>
Jessica Frazelled17e06f2014-10-18 21:40:41 -07003# COMMENTS:
Jessica Frazellea68d9832015-10-06 17:57:52 -07004# This file describes how to build the atom editor
Jessica Frazelle17bbb622015-06-05 10:24:11 -07005# in a container with all dependencies installed.
6# Note: atom is not a node-webkit app,
7# found this out a little too late into this example
Daniel Petty7bd453d2015-08-01 10:58:09 -06008# it uses electron(https://github.com/atom/electron)
Jessica Frazelle17bbb622015-06-05 10:24:11 -07009# Tested on Debian Jessie.
Jessica Frazelled17e06f2014-10-18 21:40:41 -070010# USAGE:
Jessica Frazelle17bbb622015-06-05 10:24:11 -070011# # Download atom Dockerfile
Jess Frazelled6396732016-10-25 13:37:56 -070012# wget https://raw.githubusercontent.com/jessfraz/dockerfiles/master/atom/Dockerfile
Jessica Frazelled17e06f2014-10-18 21:40:41 -070013#
Jessica Frazelle17bbb622015-06-05 10:24:11 -070014# # Build atom image
15# docker build -t atom .
Jessica Frazelled17e06f2014-10-18 21:40:41 -070016#
Jessica Frazelle17bbb622015-06-05 10:24:11 -070017# docker run -v /tmp/.X11-unix:/tmp/.X11-unix \
Jessica Frazelle198f1bc2015-06-05 11:55:25 -070018# -e DISPLAY=unix$DISPLAY atom
Jessica Frazelled17e06f2014-10-18 21:40:41 -070019#
20
Jessica Frazelled17e06f2014-10-18 21:40:41 -070021# Base docker image
Jess Frazelle852c4882018-05-11 09:52:43 -040022FROM debian:sid
Michael7eea00e2017-03-09 18:14:37 +000023LABEL maintainer "Jessie Frazelle <jess@linux.com>"
Jessica Frazelled17e06f2014-10-18 21:40:41 -070024
25# Install dependencies
Jessica Frazellea68d9832015-10-06 17:57:52 -070026RUN apt-get update && apt-get install -y \
Jessica Frazelle89d95b12016-02-04 12:11:11 -080027 git \
Jessica Frazellea68d9832015-10-06 17:57:52 -070028 gconf2 \
29 gconf-service \
Jessica Frazellea68d9832015-10-06 17:57:52 -070030 gvfs-bin \
Michael Käuflf3bafc42015-11-04 00:43:28 +010031 libasound2 \
Christian55adf5b2016-09-20 16:38:46 +020032 libcap2 \
Michael Käuflf3bafc42015-11-04 00:43:28 +010033 libgconf-2-4 \
34 libgnome-keyring-dev \
35 libgtk2.0-0 \
Jessica Frazellea68d9832015-10-06 17:57:52 -070036 libnotify4 \
Michael Käuflf3bafc42015-11-04 00:43:28 +010037 libnss3 \
Michael Käufl4463f272016-11-24 13:36:45 +010038 libxkbfile1 \
39 libxss1 \
Michael Käuflf3bafc42015-11-04 00:43:28 +010040 libxtst6 \
Harald van der Laan198c67b2017-09-22 14:50:39 +020041 libx11-xcb-dev \
Jessica Frazelle89d95b12016-02-04 12:11:11 -080042 xdg-utils \
Jessica Frazellea68d9832015-10-06 17:57:52 -070043 --no-install-recommends \
Michael Käuflf3bafc42015-11-04 00:43:28 +010044 && rm -rf /var/lib/apt/lists/*
Jessica Frazelled17e06f2014-10-18 21:40:41 -070045
Jess Frazellee07ca3c2018-05-11 09:29:47 -040046ENV ATOM_VERSION 1.26.1
Ivan Alejandroc5873312015-06-13 22:53:22 -030047
Jessica Frazelle89d95b12016-02-04 12:11:11 -080048# download the source
49RUN buildDeps=' \
50 ca-certificates \
51 curl \
52 ' \
53 && set -x \
54 && apt-get update && apt-get install -y $buildDeps --no-install-recommends \
55 && rm -rf /var/lib/apt/lists/* \
56 && curl -sSL https://github.com/atom/atom/releases/download/v${ATOM_VERSION}/atom-amd64.deb -o /tmp/atom-amd64.deb \
Jessica Frazellea68d9832015-10-06 17:57:52 -070057 && dpkg -i /tmp/atom-amd64.deb \
Jessica Frazelle89d95b12016-02-04 12:11:11 -080058 && rm -rf /tmp/*.deb \
59 && apt-get purge -y --auto-remove $buildDeps
Jessica Frazelled17e06f2014-10-18 21:40:41 -070060
61# Autorun atom
Jessica Frazellea68d9832015-10-06 17:57:52 -070062ENTRYPOINT [ "atom", "--foreground" ]