Skip to content

Commit 8d4cb0f

Browse files
graysidefhinkel
authored andcommitted
run: use node:10-slim (#1470)
1 parent ff0bcfe commit 8d4cb0f

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

run/image-processing/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
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
2727
COPY 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.
3535
COPY . .

run/image-processing/README.md

+3
Original file line numberDiff line numberDiff 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

run/logging-manual/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
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.
1010
WORKDIR /usr/src/app
@@ -15,9 +15,9 @@ WORKDIR /usr/src/app
1515
COPY 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.
2323
COPY . .

run/logging-manual/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
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
}

run/pubsub/.envrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export GOOGLE_CLOUD_PROJECT=adamross-svls-kibble
2+
export SERVICE_NAME=pubsub-tutorial
3+
export DOCKER_IMAGE_TAG=nodejs

run/pubsub/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
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.
1212
WORKDIR /usr/src/app
@@ -17,9 +17,9 @@ WORKDIR /usr/src/app
1717
COPY 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.
2525
COPY . .

run/pubsub/README.md

+1-4
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)