Webhooks
A webhook is a POST request sent to a URL that you define in Docker Hub or another registry. Use webhooks to trigger an action or a service in response to a repository push event.
Webhooks are only available on non-Edge environments (environments running Portainer Server or Portainer Agent, not the Portainer Edge Agent). This is because the tunnel to the Portainer Edge Agent is only opened on-demand, and therefore would mean there is no way to expose a webhook permanently.
Enabling a service webhook
From the menu select Services then select the service that you want to configure the webhook for.
In the Service details screen toggle the Service webhook option on. When the URL appears, click Copy link. This URL will be used to configure the webhook in your chosen registry.
This example shows how to trigger the webhook using redeploy
:
This example shows how to trigger the webhook using update service image with a different tag
:
Configuring the webhook in Docker Hub
To finish the configuration, refer to Docker's own documentation.
Last updated