Tips and tricks
Automatic reload
When you call Cloud Functions locally, they are reloaded each time you call them. This means you don't have to call the Ingress every time you make a code or configuration change.
Docker error when building a Cloud Function
After running the commandmake run.
you get the following error message:
ERROR - Exception with setting up ((project)). Please make sure you have docker installed on your machine and port 27017 is unused or configure a different port...
You should be able to use the docker CLI as a normal user (without sudo
). If this fails you can give your user account the right permissions by running the command:
sudo usermod -aG docker $USER
After logging in again, you should be able to build the project without Docker errors.
Docker error when building a Cloud Function with Docker Desktop on macOS
After running the command make run
you get the following error message:
ERROR - Exception with setting up DocumentDB. Please make sure you have docker installed on your machine and port 27017 is unused or configure a different port by setting DOCUMENT_DB_PORT to an available port
In Docker Desktop under Settings > Advanced
enable the option Allow the default Docker socket to be used
.
Updated 10 months ago