diff --git a/template/node-arm64/Dockerfile b/template/node-arm64/Dockerfile index 257c0af7..8c2a6da0 100644 --- a/template/node-arm64/Dockerfile +++ b/template/node-arm64/Dockerfile @@ -11,6 +11,8 @@ WORKDIR /root/ ENV NPM_CONFIG_LOGLEVEL warn # Wrapper/boot-strapper +ARG NPM_TOKEN +COPY function/.npmrc ./ COPY package.json . RUN npm i diff --git a/template/node-arm64/function/.npmrc b/template/node-arm64/function/.npmrc new file mode 100644 index 00000000..e69de29b diff --git a/template/node-arm64/template.yml b/template/node-arm64/template.yml index 97e25c5f..b4532161 100644 --- a/template/node-arm64/template.yml +++ b/template/node-arm64/template.yml @@ -1,2 +1,8 @@ language: node-arm64 fprocess: node index.js +welcome_message: | + You have created a new function which uses Node.js 8.9.1. + npm i --save can be used to add third-party packages like request or cheerio + You may add a private registry to the .npmrc file and use the NPM_TOKEN build-arg + npm documentation: https://docs.npmjs.com/ + diff --git a/template/node-armhf/Dockerfile b/template/node-armhf/Dockerfile index d99bc4f0..83feb844 100644 --- a/template/node-armhf/Dockerfile +++ b/template/node-armhf/Dockerfile @@ -9,6 +9,8 @@ RUN apk add --no-cache nodejs nodejs-npm ca-certificates WORKDIR /root/ +ARG NPM_TOKEN +COPY function/.npmrc ./ COPY package.json . RUN npm i diff --git a/template/node-armhf/function/.npmrc b/template/node-armhf/function/.npmrc new file mode 100644 index 00000000..e69de29b diff --git a/template/node-armhf/template.yml b/template/node-armhf/template.yml index c2313ae6..d6599a25 100644 --- a/template/node-armhf/template.yml +++ b/template/node-armhf/template.yml @@ -1,2 +1,7 @@ language: node-armhf fprocess: node index.js +welcome_message: | + You have created a new function which uses the latest Node.js. + npm i --save can be used to add third-party packages like request or cheerio + You may add a private registry to the .npmrc file and use the NPM_TOKEN build-arg + npm documentation: https://docs.npmjs.com/ diff --git a/template/node/Dockerfile b/template/node/Dockerfile index f72025b7..b71b41cf 100644 --- a/template/node/Dockerfile +++ b/template/node/Dockerfile @@ -16,6 +16,8 @@ RUN mkdir -p /home/app # Wrapper/boot-strapper WORKDIR /home/app +ARG NPM_TOKEN +COPY function/.npmrc ./ COPY package.json ./ # This ordering means the npm installation is cached for the outer function handler. diff --git a/template/node/function/.npmrc b/template/node/function/.npmrc new file mode 100644 index 00000000..e69de29b diff --git a/template/node/template.yml b/template/node/template.yml index b2589d88..755f68f3 100644 --- a/template/node/template.yml +++ b/template/node/template.yml @@ -3,4 +3,5 @@ fprocess: node index.js welcome_message: | You have created a new function which uses Node.js 8.9.1. npm i --save can be used to add third-party packages like request or cheerio + You may add a private registry to the .npmrc file and use the NPM_TOKEN build-arg npm documentation: https://docs.npmjs.com/