-
Notifications
You must be signed in to change notification settings - Fork 187
/
Dockerfile
18 lines (16 loc) · 930 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM smebberson/alpine-consul-base:4.2.0
MAINTAINER Scott Mebberson <[email protected]>
ENV NODE_VERSION=v6.11.0 NPM_VERSION=3
RUN apk upgrade --update --no-cache && \
apk add --update --no-cache 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