Reputation: 19
I have a Angular with universal project. I'm deploying it through Google Cloud Run. I get a listening port error when loading image through EDIT & DEPLOY. It works on docker locally. Checking the logs on Google Cloud logs it cannot find the "dist/website3/server/main.js". Any ideas?
Dockerfile
FROM node:18-slim
COPY . .
CMD ["node", "dist/website3/server/main.js"]
.dockerignore
node_modules
server.ts
npm-debug.log
Dockerfile*
tsconfig.*
docker-compose*
.angular
package*
karma.conf.js
.dockerignore
.git
.gitignore
README.md
LICENSE
src
.vscode
Upvotes: 1
Views: 160
Reputation: 19
This explains what is going on https://anandprashant.com/cloudbuild-and-dockerignore/
So I'll add .gcloudignore with
#!include:.dockerignore
This meens I don't have to duplicate content of .dockerignore in .gcloudignore and it should work like the local version. This does not work when I tested, "unable to evaluate symlinks in Dockerfile path: lstat /workspace/Dockerfile: no such file or directory"
Upvotes: 0