forked from jessfraz/dockerfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use node base image and improve build time/space
- Use node base image, this simplify the Dockerfile, ease the update for node stuff. - Flatten images to decrease layers' size - Do a shallow clone to speedup build time
- Loading branch information
1 parent
1cdd00b
commit 39bb44a
Showing
1 changed file
with
15 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,32 +20,26 @@ | |
# | ||
|
||
# Base docker image | ||
FROM debian:jessie | ||
FROM node | ||
MAINTAINER Jessica Frazelle <[email protected]> | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
build-essential \ | ||
ca-certificates \ | ||
curl \ | ||
git \ | ||
libasound2 \ | ||
libgconf-2-4 \ | ||
libgnome-keyring-dev \ | ||
libgtk2.0-0 \ | ||
libnss3 \ | ||
libxtst6 \ | ||
--no-install-recommends | ||
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ | ||
libasound2 \ | ||
libgconf-2-4 \ | ||
libgnome-keyring-dev \ | ||
libgnome-keyring-dev \ | ||
libgtk2.0-0 \ | ||
libnss3 \ | ||
libxtst6 && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
# install node | ||
RUN curl -sL https://deb.nodesource.com/setup | bash - | ||
RUN apt-get install -y nodejs | ||
|
||
# clone atom | ||
RUN git clone https://github.com/atom/atom /src | ||
WORKDIR /src | ||
RUN git fetch && git checkout $(git describe --tags `git rev-list --tags --max-count=1`) | ||
RUN script/build && script/grunt install | ||
|
||
RUN LATEST_TAG=`git ls-remote --tags https://github.com/atom/atom | sort -t '/' -k3 --version-sort | tail -n1 | cut -d'/' -f3` && \ | ||
git clone -b $LATEST_TAG https://github.com/atom/atom --depth 1 /src && \ | ||
script/build && script/grunt install && \ | ||
rm -fr /src | ||
|
||
# Autorun atom | ||
CMD /usr/local/bin/atom --foreground --log-file /var/log/atom.log && tail -f /var/log/atom.log |