Skip to content

Commit

Permalink
Add Dockerfile for building Yarn (#2628)
Browse files Browse the repository at this point in the history
* Add Dockerfile for building Yarn

* Use Node.js 7.x

* Don't send any files to Docker daemon

* Remove Debian comment
  • Loading branch information
Daniel15 authored Feb 11, 2017
1 parent 3dc9cf4 commit b57fcc9
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# None of the files (other than the Dockerfile) are required to build the Docker
# container, so we don't need to send *any* files to the Docker daemon.
*
42 changes: 42 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Dockerfile for building Yarn.

FROM ubuntu:16.04
MAINTAINER Daniel Lo Nigro <[email protected]>

ENV DEBIAN_FRONTEND noninteractive

# Add Yarn package repo - We require Yarn to build Yarn itself :D
ADD https://dl.yarnpkg.com/debian/pubkey.gpg /tmp/yarn-pubkey.gpg
RUN apt-key add /tmp/yarn-pubkey.gpg && rm /tmp/yarn-pubkey.gpg
RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list

# Add NodeSource Node.js repo for newer Node.js version
ADD https://deb.nodesource.com/setup_7.x /tmp/nodesource-setup.sh
RUN chmod +x /tmp/nodesource-setup.sh && /tmp/nodesource-setup.sh && rm /tmp/nodesource-setup.sh

# Debian packages
RUN apt-get -y update && \
apt-get install -y --no-install-recommends \
build-essential \
fakeroot \
gcc \
git \
lintian \
make \
nodejs \
rpm \
ruby \
ruby-dev \
unzip \
yarn \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Ruby packages
RUN gem install fpm

### Custom apps
# ghr (just needed for releases, could probably be optional)
ADD https://github.com/tcnksm/ghr/releases/download/v0.5.0/ghr_v0.5.0_linux_amd64.zip /tmp/ghr.zip
RUN unzip /tmp/ghr.zip -d /usr/local/bin/ && rm /tmp/ghr.zip

0 comments on commit b57fcc9

Please sign in to comment.