github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/containers/compilers/rump/nodejs/Dockerfile.hw (about) 1 FROM projectunik/compilers-rump-base-hw:8c532004d98728f4 2 3 RUN apt-get update 4 RUN apt-get install -y python 5 RUN mkdir -p /opt/nodejs 6 RUN cd /opt/nodejs && git clone https://github.com/rumpkernel/rumprun-packages 7 RUN cd /opt/nodejs/rumprun-packages/nodejs && \ 8 cp ../config.mk.dist ../config.mk && \ 9 perl -pi -e 's/RUMPRUN_TOOLCHAIN_TUPLE=/RUMPRUN_TOOLCHAIN_TUPLE=x86_64-rumprun-netbsd/g' ../config.mk && \ 10 make 11 12 COPY node-wrapper /opt/node-wrapper/ 13 14 VOLUME /opt/code 15 WORKDIR /opt/nodejs/rumprun-packages/nodejs 16 17 ENV RUMP_BAKE=hw_generic 18 19 RUN rumprun-bake $RUMP_BAKE \ 20 /opt/nodejs/rumprun-packages/nodejs/build-4.3.0/out/Release/node-default.bin \ 21 /opt/nodejs/rumprun-packages/nodejs/build-4.3.0/out/Release/node-default 22 23 # RUN LIKE THIS: docker run --rm -v /path/to/code:/opt/code projectunik/compilers-rump-nodejs-hw 24 CMD set -x && \ 25 (if [ -z "$MAIN_FILE" ]; then echo "Need to set MAIN_FILE"; exit 1; fi) && \ 26 (if [ -z "$BOOTSTRAP_TYPE" ]; then echo "Need to set BOOTSTRAP_TYPE"; exit 1; fi) && \ 27 mv /opt/node-wrapper/node-wrapper-${BOOTSTRAP_TYPE}.js /opt/code/node-wrapper.js && \ 28 cp -r /opt/node-wrapper/* /opt/code/ && \ 29 perl -pi -e 's/\/\/CALL_NODE_MAIN_HERE/require("\.\/$ENV{MAIN_FILE}")/g' /opt/code/node-wrapper.js && \ 30 cp /opt/nodejs/rumprun-packages/nodejs/build-4.3.0/out/Release/node-default.bin /opt/code/program.bin