update atom

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
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 @@
 	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" ]