-
Notifications
You must be signed in to change notification settings - Fork 186
/
Dockerfile
18 lines (16 loc) · 925 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM smebberson/alpine-nginx:3.0.0
MAINTAINER Scott Mebberson <scott@scottmebberson.com>
ENV NODE_VERSION=v6.1.0 NPM_VERSION=3
RUN echo "http://dl-4.alpinelinux.org/alpine/v3.2/main" >> /etc/apk/repositories && \
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 && \
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 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