If you're running the faas-cli with sudo we recommend using sudo -E to pass through any environmental variables you may have configured such as a http_proxy, https_proxy or no_proxy entry.
The faas-cli is also available as a Docker image making it convenient for use in CI jobs such as with a Jenkins pipeline or a task in cron.
There is no "latest" tag, so find the version of the CLI you want to use from the tags page on the Docker Hub. These correspond to the release from GitHub.
Note: the Docker image cannot be used to perform a build directly, but you can use it to generate a build context which can be used with a container builder such as the OpenFaaS Pro Function Builder API, Docker, buildkit or Kaniko in another part of your build pipeline.
Use-cases for the Docker image:
Generate the build context without running docker with the faas-cli build --shrinkwrap command
Deploy an existing image to a remote server faas-cli deploy
Manage secrets with faas-cli secret
Invoke functions via cron with faas-cli invoke
Check the health of your remote gateway with faas-cli info