I've created a react app and try to deploy the app at kubernetes using the google cloud platform.

I’ve followed this steps:

Create a react app:

$ dotnet react new

Run the app:

$ dotnet run

Publish the app:

$ dotnet publish -c Release

Go to your publish folder:

cd bin/Release/netcoreapp2.0/publish

Create the Dockerfile

FROM gcr.io/google-appengine/aspnetcore:2.0 
ADD ./bin/Release/netcoreapp2.0/publish/ /app 
ENTRYPOINT [ "dotnet", "nameApp.dll"]

Push my code into Bitbucket

Sign in to console.cloud.google.com

Create a new project or select a project

Select Cloud Shell in the right corner

Create the cluster:

gcloud container clusters create name-cluster \ --num-nodes 2 \ --machine-type n1-standart-1 \ --zone europe-west3-b

Set the PROJECT_ID as an environment variable:

$  export PROJECT_ID="$(gcloud config get-value project -q)"

Clone repository to Google Cloud Platform

Go publish folder:

cd bin/Release/netcoreapp2.0/publish

Build the image:

$ docker build -t gcr.io/${PROJECT_ID}/nameApp:v1 .

And here at 14 step I got the following error:

Sending build context to Docker daemon 1.363MB Step 1/5 : FROM gcr.io/google-appengine/aspnetcore:2.0 ---> e60b4974083a Step 2/5 : ADD ./bin/Release/netcoreapp2.0/publish/ /app ADD failed: stat /var/lib/docker/tmp/docker-builder637194216/bin/Release/netcoreapp2.0/publish: no such file or directory

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.