Skip to content

Commit b57fcc9

Browse files
authored
Add Dockerfile for building Yarn (#2628)
* Add Dockerfile for building Yarn * Use Node.js 7.x * Don't send any files to Docker daemon * Remove Debian comment
1 parent 3dc9cf4 commit b57fcc9

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# None of the files (other than the Dockerfile) are required to build the Docker
2+
# container, so we don't need to send *any* files to the Docker daemon.
3+
*

Dockerfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Dockerfile for building Yarn.
2+
3+
FROM ubuntu:16.04
4+
MAINTAINER Daniel Lo Nigro <[email protected]>
5+
6+
ENV DEBIAN_FRONTEND noninteractive
7+
8+
# Add Yarn package repo - We require Yarn to build Yarn itself :D
9+
ADD https://dl.yarnpkg.com/debian/pubkey.gpg /tmp/yarn-pubkey.gpg
10+
RUN apt-key add /tmp/yarn-pubkey.gpg && rm /tmp/yarn-pubkey.gpg
11+
RUN echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
12+
13+
# Add NodeSource Node.js repo for newer Node.js version
14+
ADD https://deb.nodesource.com/setup_7.x /tmp/nodesource-setup.sh
15+
RUN chmod +x /tmp/nodesource-setup.sh && /tmp/nodesource-setup.sh && rm /tmp/nodesource-setup.sh
16+
17+
# Debian packages
18+
RUN apt-get -y update && \
19+
apt-get install -y --no-install-recommends \
20+
build-essential \
21+
fakeroot \
22+
gcc \
23+
git \
24+
lintian \
25+
make \
26+
nodejs \
27+
rpm \
28+
ruby \
29+
ruby-dev \
30+
unzip \
31+
yarn \
32+
&& \
33+
apt-get clean && \
34+
rm -rf /var/lib/apt/lists/*
35+
36+
# Ruby packages
37+
RUN gem install fpm
38+
39+
### Custom apps
40+
# ghr (just needed for releases, could probably be optional)
41+
ADD https://github.com/tcnksm/ghr/releases/download/v0.5.0/ghr_v0.5.0_linux_amd64.zip /tmp/ghr.zip
42+
RUN unzip /tmp/ghr.zip -d /usr/local/bin/ && rm /tmp/ghr.zip

0 commit comments

Comments
 (0)