Update Dockerfile
This commit is contained in:
10
Dockerfile
10
Dockerfile
@@ -11,13 +11,15 @@ RUN apk add --no-cache --virtual .build-deps binutils-gold curl g++ gcc gnupg li
|
||||
|
||||
# donwload and compile node from source code.
|
||||
RUN wget https://nodejs.org/dist/$NodeVersion/node-$NodeVersion.tar.gz && tar -zxvf node-$NodeVersion.tar.gz
|
||||
RUN cd node-$NodeVersion && ./configure --partly-static && make -j$(getconf _NPROCESSORS_ONLN)
|
||||
RUN cd node-$NodeVersion && ./configure --dest-cpu=x64 --partly-static && make -j$(getconf _NPROCESSORS_ONLN)
|
||||
|
||||
# create and copy tar.gz into /node_staging
|
||||
RUN mkdir -p /usr/src/bin
|
||||
RUN cp /usr/src/app/out/Release/node /usr/src/bin
|
||||
RUN mkdir -p /usr/src/out/bin
|
||||
RUN cp /usr/src/app/node-$NodeVersion/out/Release/node /usr/src/out/bin
|
||||
RUN cp /usr/src/app/node-$NodeVersion/LICENSE /usr/src/out/LICENSE
|
||||
RUN tar -czvf node-$NodeVersion-alpine.tar.gz /usr/src/bin
|
||||
RUN cp ./node-$NodeVersion-alpine.tar.gz /node_staging
|
||||
RUN tar -czvf node-$NodeVersion-alpine-x64.tar.gz /usr/src/out/bin /usr/src/out/LICENSE
|
||||
RUN cp ./node-$NodeVersion-alpine-x64.tar.gz /node_staging
|
||||
|
||||
# copy the tar.gz into the mapped in volume
|
||||
CMD ["cp", "/node_staging", "/node_output"]
|
||||
|
||||
Reference in New Issue
Block a user