From 89d95b1081eb7f5eb1dac97e505960acec08ec6e Mon Sep 17 00:00:00 2001
From: Jessica Frazelle <acidburn@docker.com>
Date: Thu, 4 Feb 2016 12:11:11 -0800
Subject: [PATCH] update atom

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
---
 atom/Dockerfile | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/atom/Dockerfile b/atom/Dockerfile
index 3eec203..35771b8 100644
--- a/atom/Dockerfile
+++ b/atom/Dockerfile
@@ -20,16 +20,14 @@
 #
 
 # Base docker image
-FROM jess/chromium
+FROM debian:jessie
 MAINTAINER Jessica Frazelle <jess@docker.com>
 
 # Install dependencies
 RUN apt-get update && apt-get install -y \
-	ca-certificates \
-	curl \
+	git \
 	gconf2 \
 	gconf-service \
-	git \
 	gvfs-bin \
 	libasound2 \
 	libgconf-2-4 \
@@ -38,14 +36,24 @@ RUN apt-get update && apt-get install -y \
 	libnotify4 \
 	libnss3 \
 	libxtst6 \
+	xdg-utils \
 	--no-install-recommends \
 	&& rm -rf /var/lib/apt/lists/*
 
 ENV ATOM_VERSION 1.4.0
 
-RUN curl -sSL https://github.com/atom/atom/releases/download/v${ATOM_VERSION}/atom-amd64.deb -o /tmp/atom-amd64.deb \
+# download the source
+RUN buildDeps=' \
+		ca-certificates \
+		curl \
+	' \
+	&& set -x \
+	&& apt-get update && apt-get install -y $buildDeps --no-install-recommends \
+	&& rm -rf /var/lib/apt/lists/* \
+	&& curl -sSL https://github.com/atom/atom/releases/download/v${ATOM_VERSION}/atom-amd64.deb -o /tmp/atom-amd64.deb \
 	&& dpkg -i /tmp/atom-amd64.deb \
-	&& rm -rf /tmp
+	&& rm -rf /tmp/*.deb \
+	&& apt-get purge -y --auto-remove $buildDeps
 
 # Autorun atom
 ENTRYPOINT [ "atom", "--foreground" ]