File tree 7 files changed +19
-17
lines changed
7 files changed +19
-17
lines changed Original file line number Diff line number Diff line change 2
2
# Use of this source code is governed by the Apache 2.0
3
3
# license that can be found in the LICENSE file.
4
4
5
- # Use the official Node.js 10 image.
5
+ # Use the official lightweight Node.js 10 image.
6
6
# https://hub.docker.com/_/node
7
- FROM node:10
7
+ FROM node:10-slim
8
8
9
9
# [START run_imageproc_dockerfile_imagemagick]
10
10
@@ -27,9 +27,9 @@ WORKDIR /usr/src/app
27
27
COPY package*.json ./
28
28
29
29
# 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'.
32
31
# RUN npm ci --only=production
32
+ RUN npm install --production
33
33
34
34
# Copy local code to the container image.
35
35
COPY . .
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
10
10
11
11
* ** express** : Web server framework
12
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.
13
16
14
17
## Environment Variables
15
18
Original file line number Diff line number Diff line change 2
2
# Use of this source code is governed by the Apache 2.0
3
3
# license that can be found in the LICENSE file.
4
4
5
- # Use the official Node.js 10 image.
5
+ # Use the official lightweight Node.js 10 image.
6
6
# https://hub.docker.com/_/node
7
- FROM node:10
7
+ FROM node:10-slim
8
8
9
9
# Create and change to the app directory.
10
10
WORKDIR /usr/src/app
@@ -15,9 +15,9 @@ WORKDIR /usr/src/app
15
15
COPY package*.json ./
16
16
17
17
# 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'.
20
19
# RUN npm ci --only=production
20
+ RUN npm install --production
21
21
22
22
# Copy local code to the container image.
23
23
COPY . .
Original file line number Diff line number Diff line change 20
20
},
21
21
"devDependencies" : {
22
22
"@google-cloud/logging" : " ^5.1.2" ,
23
- "@google-cloud/nodejs-repo-tools" : " ^3.3.0" ,
24
23
"mocha" : " ^6.1.4"
25
24
}
26
25
}
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 4
4
5
5
# [START run_pubsub_dockerfile]
6
6
7
- # Use the official Node.js 10 image.
7
+ # Use the official lightweight Node.js 10 image.
8
8
# https://hub.docker.com/_/node
9
- FROM node:10
9
+ FROM node:10-slim
10
10
11
11
# Create and change to the app directory.
12
12
WORKDIR /usr/src/app
@@ -17,9 +17,9 @@ WORKDIR /usr/src/app
17
17
COPY package*.json ./
18
18
19
19
# 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'.
22
21
# RUN npm ci --only=production
22
+ RUN npm install --production
23
23
24
24
# Copy local code to the container image.
25
25
COPY . .
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
9
9
## Dependencies
10
10
11
11
* ** 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