forked from mhart/alpine-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
19 lines (18 loc) · 939 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM janeczku/alpine-kubernetes:3.2
ENV VERSION=v5.3.0 NPM_VERSION=3
RUN apk add --update curl make gcc g++ binutils-gold python linux-headers paxctl libgcc libstdc++ && \
curl -sSL https://nodejs.org/dist/${VERSION}/node-${VERSION}.tar.gz | tar -xz && \
cd /node-${VERSION} && \
./configure --prefix=/usr ${CONFIG_FLAGS} && \
make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) && \
make install && \
paxctl -cm /usr/bin/node && \
cd / && \
if [ -x /usr/bin/npm ]; then \
npm install -g npm@${NPM_VERSION} && \
find /usr/lib/node_modules/npm -name test -o -name .bin -type d | xargs rm -rf; \
fi && \
apk del curl make gcc g++ binutils-gold python linux-headers paxctl ${DEL_PKGS} && \
rm -rf /etc/ssl /node-${VERSION} ${RM_DIRS} \
/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