-
Notifications
You must be signed in to change notification settings - Fork 186
/
Dockerfile
23 lines (20 loc) · 942 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM smebberson/alpine-base:3.3.0
MAINTAINER Scott Mebberson <[email protected]>
ENV NODE_VERSION=v8.0.0 NPM_VERSION=5
RUN addgroup node && \
adduser -D -g "" -s /bin/sh -G node node && \
apk upgrade --update && \
apk add --update git curl make gcc g++ python linux-headers libgcc libstdc++ && \
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 && \
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
# Add the files
COPY root /