I am trying to build an image using google cloud build for my GKE. Locally I can build images using this command:
docker build -t backend .
docker tag backend gcr.io/project-id/backend:v15.8
docker push gcr.io/project-id/backend:v15.8
And it works fine but when I am trying to use:
steps:
- name: "gcr.io/cloud-builders/docker"
args: ["build", "-t", "gcr.io/project-id/backend:v15.8", "."]
# push container image
- name: "gcr.io/cloud-builders/docker"
args: ["push", "gcr.io/project-id/backend:v15.8"]
This code is building the image but I don't know why some of the files it misses. I have several files in .gitignore.
I can build an image but it is not the same as I am building an image from command locally. When I am deploying it to my GKE one file is missing which is in .gitignore file. What do I need to do in order to achieve my goal