Skip to content

Commit

Permalink
Added ccache for alpine build
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentGoderre committed Jun 14, 2018
1 parent 4eb8150 commit 9a7433f
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 0 deletions.
9 changes: 9 additions & 0 deletions 10/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ FROM alpine:3.7

ENV NODE_VERSION 10.4.1

ARG CCACHE_REPO=https://github.com/LaurentGoderre/nodejs-alpine-ccache

RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
binutils-gold \
ccache \
curl \
g++ \
gcc \
git \
gnupg \
libgcc \
linux-headers \
make \
python \
&& git clone $CCACHE_REPO /root/.ccache \
# gpg keys listed at https://github.com/nodejs/node#release-team
&& for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
Expand All @@ -37,10 +42,14 @@ RUN addgroup -g 1000 node \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& ln -s /usr/bin/ccache /usr/local/bin/gcc \
&& ln -s /usr/bin/ccache /usr/local/bin/g++ \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& rm /usr/local/bin/gcc \
&& rm /usr/local/bin/g++ \
&& apk del .build-deps \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
Expand Down
9 changes: 9 additions & 0 deletions 6/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ FROM alpine:3.4

ENV NODE_VERSION 6.14.3

ARG CCACHE_REPO=https://github.com/LaurentGoderre/nodejs-alpine-ccache

RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
binutils-gold \
ccache \
curl \
g++ \
gcc \
git \
gnupg \
libgcc \
linux-headers \
make \
python \
&& git clone $CCACHE_REPO /root/.ccache \
# gpg keys listed at https://github.com/nodejs/node#release-team
&& for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
Expand All @@ -37,10 +42,14 @@ RUN addgroup -g 1000 node \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& ln -s /usr/bin/ccache /usr/local/bin/gcc \
&& ln -s /usr/bin/ccache /usr/local/bin/g++ \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& rm /usr/local/bin/gcc \
&& rm /usr/local/bin/g++ \
&& apk del .build-deps \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
Expand Down
9 changes: 9 additions & 0 deletions 8/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ FROM alpine:3.6

ENV NODE_VERSION 8.11.3

ARG CCACHE_REPO=https://github.com/LaurentGoderre/nodejs-alpine-ccache

RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
binutils-gold \
ccache \
curl \
g++ \
gcc \
git \
gnupg \
libgcc \
linux-headers \
make \
python \
&& git clone $CCACHE_REPO /root/.ccache \
# gpg keys listed at https://github.com/nodejs/node#release-team
&& for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
Expand All @@ -37,10 +42,14 @@ RUN addgroup -g 1000 node \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& ln -s /usr/bin/ccache /usr/local/bin/gcc \
&& ln -s /usr/bin/ccache /usr/local/bin/g++ \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& rm /usr/local/bin/gcc \
&& rm /usr/local/bin/g++ \
&& apk del .build-deps \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
Expand Down
9 changes: 9 additions & 0 deletions 9/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ FROM alpine:3.6

ENV NODE_VERSION 9.11.2

ARG CCACHE_REPO=https://github.com/LaurentGoderre/nodejs-alpine-ccache

RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
binutils-gold \
ccache \
curl \
g++ \
gcc \
git \
gnupg \
libgcc \
linux-headers \
make \
python \
&& git clone $CCACHE_REPO /root/.ccache \
# gpg keys listed at https://github.com/nodejs/node#release-team
&& for key in \
94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \
Expand All @@ -37,10 +42,14 @@ RUN addgroup -g 1000 node \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& ln -s /usr/bin/ccache /usr/local/bin/gcc \
&& ln -s /usr/bin/ccache /usr/local/bin/g++ \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& rm /usr/local/bin/gcc \
&& rm /usr/local/bin/g++ \
&& apk del .build-deps \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
Expand Down
9 changes: 9 additions & 0 deletions Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@ FROM alpine:0.0

ENV NODE_VERSION 0.0.0

ARG CCACHE_REPO=https://github.com/LaurentGoderre/nodejs-alpine-ccache

RUN addgroup -g 1000 node \
&& adduser -u 1000 -G node -s /bin/sh -D node \
&& apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
binutils-gold \
ccache \
curl \
g++ \
gcc \
git \
gnupg \
libgcc \
linux-headers \
make \
python \
&& git clone $CCACHE_REPO /root/.ccache \
# gpg keys listed at https://github.com/nodejs/node#release-team
&& for key in \
"${NODE_KEYS[@]}"
Expand All @@ -29,10 +34,14 @@ RUN addgroup -g 1000 node \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& ln -s /usr/bin/ccache /usr/local/bin/gcc \
&& ln -s /usr/bin/ccache /usr/local/bin/g++ \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) \
&& make install \
&& rm /usr/local/bin/gcc \
&& rm /usr/local/bin/g++ \
&& apk del .build-deps \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
Expand Down

0 comments on commit 9a7433f

Please sign in to comment.