diff --git a/run/image-processing/Dockerfile b/run/image-processing/Dockerfile index 70a617b235..9f366cc41e 100644 --- a/run/image-processing/Dockerfile +++ b/run/image-processing/Dockerfile @@ -2,9 +2,9 @@ # Use of this source code is governed by the Apache 2.0 # license that can be found in the LICENSE file. -# Use the official Node.js 10 image. +# Use the official lightweight Node.js 10 image. # https://hub.docker.com/_/node -FROM node:10 +FROM node:10-slim # [START run_imageproc_dockerfile_imagemagick] @@ -27,9 +27,9 @@ WORKDIR /usr/src/app COPY package*.json ./ # Install dependencies. -RUN npm install --production -# If you add a package-lock.json, speed your build by switching to 'npm ci'. +# If you add a package-lock.json speed your build by switching to 'npm ci'. # RUN npm ci --only=production +RUN npm install --production # Copy local code to the container image. COPY . . diff --git a/run/image-processing/README.md b/run/image-processing/README.md index 63b44c3b39..b070cfc853 100644 --- a/run/image-processing/README.md +++ b/run/image-processing/README.md @@ -10,6 +10,9 @@ For more details on how to work with this sample read the [Google Cloud Run Node * **express**: Web server framework * **body-parser**: express middleware for request payload processing +* **[gm](https://github.com/aheckmann/gm#readme)**: ImageMagick integration library. +* **@google-cloud/storage**: Google Cloud Storage client library. +* **@google-cloud/vision**: Cloud Vision API client library. ## Environment Variables diff --git a/run/logging-manual/Dockerfile b/run/logging-manual/Dockerfile index ca7b347297..4287d4eb07 100644 --- a/run/logging-manual/Dockerfile +++ b/run/logging-manual/Dockerfile @@ -2,9 +2,9 @@ # Use of this source code is governed by the Apache 2.0 # license that can be found in the LICENSE file. -# Use the official Node.js 10 image. +# Use the official lightweight Node.js 10 image. # https://hub.docker.com/_/node -FROM node:10 +FROM node:10-slim # Create and change to the app directory. WORKDIR /usr/src/app @@ -15,9 +15,9 @@ WORKDIR /usr/src/app COPY package*.json ./ # Install dependencies. -RUN npm install -# For production deploys, add a package-lock.json and use 'npm ci'. +# If you add a package-lock.json speed your build by switching to 'npm ci'. # RUN npm ci --only=production +RUN npm install --production # Copy local code to the container image. COPY . . diff --git a/run/logging-manual/package.json b/run/logging-manual/package.json index 05bd1a2e1d..dc4e5e0373 100644 --- a/run/logging-manual/package.json +++ b/run/logging-manual/package.json @@ -20,7 +20,6 @@ }, "devDependencies": { "@google-cloud/logging": "^5.1.2", - "@google-cloud/nodejs-repo-tools": "^3.3.0", "mocha": "^6.1.4" } } diff --git a/run/pubsub/.envrc b/run/pubsub/.envrc new file mode 100644 index 0000000000..ff9b80fe0e --- /dev/null +++ b/run/pubsub/.envrc @@ -0,0 +1,3 @@ +export GOOGLE_CLOUD_PROJECT=adamross-svls-kibble +export SERVICE_NAME=pubsub-tutorial +export DOCKER_IMAGE_TAG=nodejs diff --git a/run/pubsub/Dockerfile b/run/pubsub/Dockerfile index 7bc513b5a6..7b31f9ad64 100644 --- a/run/pubsub/Dockerfile +++ b/run/pubsub/Dockerfile @@ -4,9 +4,9 @@ # [START run_pubsub_dockerfile] -# Use the official Node.js 10 image. +# Use the official lightweight Node.js 10 image. # https://hub.docker.com/_/node -FROM node:10 +FROM node:10-slim # Create and change to the app directory. WORKDIR /usr/src/app @@ -17,9 +17,9 @@ WORKDIR /usr/src/app COPY package*.json ./ # Install dependencies. -RUN npm install --production -# If you add a package-lock.json, speed your build by switching to 'npm ci'. +# If you add a package-lock.json speed your build by switching to 'npm ci'. # RUN npm ci --only=production +RUN npm install --production # Copy local code to the container image. COPY . . diff --git a/run/pubsub/README.md b/run/pubsub/README.md index fadedf4fdf..8de08806f8 100644 --- a/run/pubsub/README.md +++ b/run/pubsub/README.md @@ -9,7 +9,4 @@ For more details on how to work with this sample read the [Google Cloud Run Node ## Dependencies * **express**: Web server framework. -* **body-parser**: express middleware for request payload processing. -* **[gm](https://github.com/aheckmann/gm#readme)**: ImageMagick integration library. -* **@google-cloud/storage**: Google Cloud Storage client library. -* **@google-cloud/vision**: Cloud Vision API client library. \ No newline at end of file +* **body-parser**: express middleware for request payload processing. \ No newline at end of file