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 - Exception with setting up ((project))
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 - Error while fetching server API version
After running the commandmake run.
you get the following error message:
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory')) make: *** [run] Error 1
Docker fails to import the ixoncdkingress
Python module. This is due to a missing symlink pointing to the Docker socket. The missing symlink can be caused by missing privileges on the host machine when installing Docker.
The solution is to manually create the missing symlink pointing to /var/run/docker.sock
. More info can be found in the Docker article Understand permission requirements for Docker Desktop on Mac.
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 about 1 month ago