Hands on with Google Cloud Run

Sushil Kumar
Apr 13 · 4 min read
var http = require(“http”)var port = process.env.PORT || 8080http.createServer(function(request, response){
response.writeHead(200, {‘Content-Tye’ : ‘text/plain’});
response.end(“Hello World”);
console.log(“Server is running at” + port)
FROM node:10.15-alpine
RUN mkdir $HOME/app
COPY main.js .
CMD [“node”, “main.js”]
docker build -t my-node-server:0.1 .
docker tag my-node-server:0.1 gcr.io/[PROJECT-ID]/my-node-server:0.1docker push gcr.io/[PROJECT-ID]/my-node-server:0.1
gcloud beta run deploy — image gcr.io/just-landing-231706/my-node-server:0.1
Output of deploy command
Deployed Web App

Sushil Kumar

Written by

A polyglot developer with a knack for Distributed systems, Cloud and automation.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade