-
Notifications
You must be signed in to change notification settings - Fork 186
/
Dockerfile
17 lines (15 loc) · 870 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FROM smebberson/alpine-base:1.2.0
MAINTAINER Scott Mebberson <[email protected]>
ENV NODE_VERSION=v4.4.1 NPM_VERSION=3
RUN apk add --update git curl make gcc g++ python linux-headers libgcc libstdc++ binutils-gold && \
curl -sSL https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz | tar -xz && \
cd /node-${NODE_VERSION} && \
./configure --prefix=/usr --without-snapshot --fully-static && \
make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
make install && \
cd / && \
npm install -g npm@${NPM_VERSION} && \
apk del gcc g++ linux-headers libgcc libstdc++ binutils-gold && \
rm -rf /etc/ssl /node-${NODE_VERSION} /usr/include \
/usr/share/man /tmp/* /var/cache/apk/* /root/.npm /root/.node-gyp \
/usr/lib/node_modules/npm/man /usr/lib/node_modules/npm/doc /usr/lib/node_modules/npm/html