File tree Expand file tree Collapse file tree 7 files changed +19
-17
lines changed Expand file tree Collapse file tree 7 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 22# Use of this source code is governed by the Apache 2.0
33# license that can be found in the LICENSE file.
44
5- # Use the official Node.js 10 image.
5+ # Use the official lightweight Node.js 10 image.
66# https://hub.docker.com/_/node
7- FROM node:10
7+ FROM node:10-slim
88
99# [START run_imageproc_dockerfile_imagemagick]
1010
@@ -27,9 +27,9 @@ WORKDIR /usr/src/app
2727COPY package*.json ./
2828
2929# Install dependencies.
30- RUN npm install --production
31- # If you add a package-lock.json, speed your build by switching to 'npm ci'.
30+ # If you add a package-lock.json speed your build by switching to 'npm ci'.
3231# RUN npm ci --only=production
32+ RUN npm install --production
3333
3434# Copy local code to the container image.
3535COPY . .
Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ For more details on how to work with this sample read the [Google Cloud Run Node
1010
1111* ** express** : Web server framework
1212* ** body-parser** : express middleware for request payload processing
13+ * ** [ gm] ( https://github.com/aheckmann/gm#readme ) ** : ImageMagick integration library.
14+ * ** @google-cloud/storage ** : Google Cloud Storage client library.
15+ * ** @google-cloud/vision ** : Cloud Vision API client library.
1316
1417## Environment Variables
1518
Original file line number Diff line number Diff line change 22# Use of this source code is governed by the Apache 2.0
33# license that can be found in the LICENSE file.
44
5- # Use the official Node.js 10 image.
5+ # Use the official lightweight Node.js 10 image.
66# https://hub.docker.com/_/node
7- FROM node:10
7+ FROM node:10-slim
88
99# Create and change to the app directory.
1010WORKDIR /usr/src/app
@@ -15,9 +15,9 @@ WORKDIR /usr/src/app
1515COPY package*.json ./
1616
1717# Install dependencies.
18- RUN npm install
19- # For production deploys, add a package-lock.json and use 'npm ci'.
18+ # If you add a package-lock.json speed your build by switching to 'npm ci'.
2019# RUN npm ci --only=production
20+ RUN npm install --production
2121
2222# Copy local code to the container image.
2323COPY . .
Original file line number Diff line number Diff line change 2020 },
2121 "devDependencies" : {
2222 "@google-cloud/logging" : " ^5.1.2" ,
23- "@google-cloud/nodejs-repo-tools" : " ^3.3.0" ,
2423 "mocha" : " ^6.1.4"
2524 }
2625}
Original file line number Diff line number Diff line change 1+ export GOOGLE_CLOUD_PROJECT=adamross-svls-kibble
2+ export SERVICE_NAME=pubsub-tutorial
3+ export DOCKER_IMAGE_TAG=nodejs
Original file line number Diff line number Diff line change 44
55# [START run_pubsub_dockerfile]
66
7- # Use the official Node.js 10 image.
7+ # Use the official lightweight Node.js 10 image.
88# https://hub.docker.com/_/node
9- FROM node:10
9+ FROM node:10-slim
1010
1111# Create and change to the app directory.
1212WORKDIR /usr/src/app
@@ -17,9 +17,9 @@ WORKDIR /usr/src/app
1717COPY package*.json ./
1818
1919# Install dependencies.
20- RUN npm install --production
21- # If you add a package-lock.json, speed your build by switching to 'npm ci'.
20+ # If you add a package-lock.json speed your build by switching to 'npm ci'.
2221# RUN npm ci --only=production
22+ RUN npm install --production
2323
2424# Copy local code to the container image.
2525COPY . .
Original file line number Diff line number Diff line change @@ -9,7 +9,4 @@ For more details on how to work with this sample read the [Google Cloud Run Node
99## Dependencies
1010
1111* ** express** : Web server framework.
12- * ** body-parser** : express middleware for request payload processing.
13- * ** [ gm] ( https://github.com/aheckmann/gm#readme ) ** : ImageMagick integration library.
14- * ** @google-cloud/storage ** : Google Cloud Storage client library.
15- * ** @google-cloud/vision ** : Cloud Vision API client library.
12+ * ** body-parser** : express middleware for request payload processing.
You can’t perform that action at this time.
0 commit comments